3 ms·
SQLite wouldn't really be ACID-compliant if multiple threads were enough to defeat the Durability guarantee, would it? I'm not so much concerned about
by TekMol 9y ago
SQLite wouldn't really be ACID-compliant if
multiple threads were enough to defeat the
Durability guarantee, would it?
I'm not so much concerned about durability. More about SQLite not responding to "SELECT v FROM t WHERE id=123" with value v but instead with something like "Error: v is currently being written by another process. Try again later" or something.
No idea if that is a realistic scenario. I'm kind of surprised I don't have this kind of problem with my filebased solution. What happens if process A reads from a file while process B writes it? No clue.
- wyoung2 9y ago> What happens if process A reads from a file while process B writes it? If process B started first, the writer blocks access to the table being written to, so the reader waits for the writer to complete. There are timeout and retry behaviors, but within those configurable limits, that's what happens. You can make SQLite behave as you worry about if you set the retries to 0 and timeout to 0, but that's not the default.