3 ms·
Am I correct that this orders and makes SQL statements durable via Raft and then executes them serially against a local SQLite database? How would you use this
by ryanworl 5y ago
Am I correct that this orders and makes SQL statements durable via Raft and then executes them serially against a local SQLite database?
How would you use this to perform a transaction, or at minimum a compare-and-swap operation against a row? There doesn't seem to be any binding between a client and a connection for you to implement transactions here.
- cube2222 5y agoI haven't read much into it, but since it's Raft, it's most certainly executing all writes/updates as well as consistent reads against a single leader node. All changes to the database would then be propagated through Raft using a commit log, which would be read and accepted by follower nodes. This is also reinforced by the fact, that nondeterministic operations are supported. Thus, everything around transactions and CAS's will work the same as it normally does, as it executes on the leader.
- otoolep 5y agoYes, that's exactly how rqlite works. If I ever get around to adding proper transaction support it will have to overcome the challenge you identify. I believe it can be done, but it will require significant changes to the current design. But an explicit goal for rqlite has always been to do a certain set of things very well, before doing something new. So I'm cautious. Systems like Chiselstore and dqlite operate at a different architectural layer, so can offer transaction support. But require more programming to use. It's a trade off.