4 ms·
> Multiple processes can have the same database open at the same time. Multiple processes can be doing a SELECT at the same time. But only one process can be ma
by bhaak 2mo ago
> Multiple processes can have the same database open at the same time. Multiple processes can be doing a SELECT at the same time. But only one process can be making changes to the database at any moment in time, however.
https://sqlite.org/faq.html#q5 https://sqlite.org/faq.html#q5
One writer, multiple readers is a specifically supported way of using SQLite.
Why should you be worried if it is used as designed?
- petcat 2mo ago> Why should you be worried if it is used as designed? Well this whole article is about a company discovering a catastrophic corruption bug even though they were using it as designed. I think the lesson is that if you're ever actually worried about concurrency then just don't use sqlite. We can see here that concurrency is hard and the bugs are old and deep.
- chuckadams 2mo agoI guarantee that any hand-rolled replacement will have more and worse bugs.