←back to thread

275 points whatisabcdefgh | 2 comments | | HN request time: 0.001s | 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 #
chungy ◴[] No.45135346[source]
That's pretty broad and over-generalized. Networking file systems without good lock support is almost always a bad setup by an administrator. Both NFS and CIFS can work with network-wide locks just fine.

SQLite advises against using a networking file system to avoid potential issues, but you can successfully do it.

replies(2): >>45135607 #>>45136892 #
1. jdboyd ◴[] No.45135607[source]
Are the typical Synology, Qnap, or TrueNAS devices with default Linux, macOS and Windows clients going to be set up correctly by default? If any of the typical things someone is likely to setup following wizards in a home or small office is likely to result in lock not working correctly for SQLite, then it is fair for them to warn against using it on a network file system.

As an application format, you don't generally expect people to be editing an ODF file at the same time though, so network locking doesn't really disqualify it for use as a document format.

replies(1): >>45135947 #
2. mschuster91 ◴[] No.45135947[source]
> As an application format, you don't generally expect people to be editing an ODF file at the same time though

Oh hell yes you do. Excel spreadsheets are notorious for people wanting to collaborate on them, and PowerPoint sheets come in close second. It used to be an absolute PITA but at least Office 365 makes the pains bearable.