4 ms·
No, it's due to rqlite. rqlite does support a form of transactions -- you can send a set of SQLite statements, and either all will be successful, or none will
by otoolep 5y ago
No, it's due to rqlite.
rqlite does support a form of transactions -- you can send a set of SQLite statements, and either all will be successful, or none will be. You can even send a BEGIN statement, and a SQLite transaction will be opened (and you can COMMIT later). However, due to the nature of Raft, restarting the cluster in the middle of an open transaction will not clear the transaction -- and most folks probably don't expect this. That's why I need to think more before advocating use of traditional transactions with rqlite -- distributed transaction functionality is easy to get wrong, so requires careful thought. You can use SQLite transactions, but you must be careful. That's why drivers don't tend to support it yet.
https://github.com/rqlite/rqlite/blob/master/DOC/DATA_API.md#transactions https://github.com/rqlite/rqlite/blob/master/DOC/DATA_API.md...
- ______-_-______ 5y agoTaken from the readme: > the behavior of a cluster if it fails while such a manually-controlled transaction is not yet defined Do you envision manually-controlled transactions working seamlessly one day? If not, have you thought about what guarantees are feasible/you hope to provide?
- otoolep 5y agoYes, I have a design in mind, but it's a fair amount of work. It will require a new API too -- and API that allows clients to explicitly create a new connection, create a transaction on it, and close that transaction when finished.
- pkaye 5y agoI there a go client other than gorqlite which doesn't seem to actively maintained.
- stavros 5y agoWould it be a better compromise to support transactions as long as they were sent as a single block?
- otoolep 5y agoNot sure if I follow you, but that's exactly what rqlite does support. https://github.com/rqlite/rqlite/blob/master/DOC/BULK.md https://github.com/rqlite/rqlite/blob/master/DOC/BULK.md
- stavros 5y agoSorry, I meant from a marketing perspective, saying "transactions are only supported in batch mode" rather than saying they aren't supported.