←back to thread

275 points whatisabcdefgh | 3 comments | | HN request time: 0s | source
Show context
lifthrasiir ◴[] No.45134401[source]
SQLite can't be reliably used in networked file systems because it heavily relies on locking to be correctly implemented. I recently had to add a check for such file systems in my application [1] because I noticed a related corruption firsthand. Simpler file formats do not demand such requirements. SQLite is certainly good, but not for this use.

[1] https://github.com/lifthrasiir/angel/commit/50a15e703ef2c1af...

replies(4): >>45134413 #>>45135134 #>>45135346 #>>45135619 #
1. afiori ◴[] No.45135134[source]
In that case the application would keep a temporary file and copy over when saving
replies(1): >>45135547 #
2. cpach ◴[] No.45135547[source]
Maybe, but how would the application know if /data/foo.bar is a local file or mounted via NFS/SMB/etc?
replies(1): >>45136701 #
3. afiori ◴[] No.45136701[source]
it would always use such a temporary file and update the "real" file only on explicit saves with fast mv or cp operations