rqlite uses Raft for consensus, and SQLite for the state machine. The Raft log contains SQL statements; once a log entry reaches a majority of nodes, the SQL statement can be applied to each SQL state.
Certain features like random() and time() are disabled, to make it deterministic. But is that enough? I thought nondeterminism is everywhere in SQL: for example floating-point sum, or limit 1.
I’m sure it’s not enough, and that heavy production use would surface nondeterminism bugs. State replication, not operation replication, is the only safe way to handle nondeterminism.
rqlite uses Raft for consensus, and SQLite for the state machine. The Raft log contains SQL statements; once a log entry reaches a majority of nodes, the SQL statement can be applied to each SQL state.
Certain features like random() and time() are disabled, to make it deterministic. But is that enough? I thought nondeterminism is everywhere in SQL: for example floating-point sum, or
limit 1
.I’m sure it’s not enough, and that heavy production use would surface nondeterminism bugs. State replication, not operation replication, is the only safe way to handle nondeterminism.