News for hackers. Stuff that matters.
Re:SQLite small blob storage: 35% Faster Than the Filesystem by TekMol on Wednesday June 14, 2017 @09:47AM (#14552642)

    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.

Re:SQLite small blob storage: 35% Faster Than the Filesystem by wyoung2 on Wednesday June 14, 2017 @10:08AM (#14552804)
> 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.