3 ms·
Recently I heard[1] that SQLite does not offer concurrent access safety. That is to say, the premise was that if you were to use it as a database backing someth
by asdkhadsj 7y ago
Recently I heard[1] that SQLite does not offer concurrent access safety. That is to say, the premise was that if you were to use it as a database backing something multi user, like a forum, SQLite would suffer due to the concurrent access of users against the DB.
While I've not had time to research it yet, I'd be curious on your (or anyones) knowledge / experience in this context.
My plan, if SQLite didn't offer concurrent access safety, was simply to put concurrent primitives around SQLite to ensure safety. However I'm not doing anything until I can make heads or tails of that original comment[1].
Thoughts?
[1]: https://news.ycombinator.com/item?id=21041433 https://news.ycombinator.com/item?id=21041433
- meddlepal 7y agoWhy not just devise a test rather than waiting for someone to hand you the answer? It's not a hard thing to simulate...
- asdkhadsj 7y agoI'm not expecting someone to hand me an answer. I was merely asking for experiences in this area. You think I'm going to rely merely on internet stranger to decide course of action on production systems? God forbid I ask for experiences from people who seem seasoned in this area on Hacker News of all places. The gall I must have, right?
- thijsvandien 7y agoI don’t have much experience with this, but I’ve been reading a bit about it last days. As far as I can tell: - Concurrent reading has always been possible. - Reading while writing is possible when the relatively new WAL mode is enabled, at no significant cost. - Writing still results in a lock, and other writers can decide how long they’re willing to wait on it.