3 ms·
> The bug only affects databases in WAL mode when there are two or more database connections open on the same file, in separate threads or processes To be hone
by Naru41 2mo ago
> The bug only affects databases in WAL mode when there are two or more database connections open on the same file, in separate threads or processes
To be honest, I'm surprised that someone using SQLite would try to access it directly from multiple threads or processes without fear of data racing.
- 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.