3 ms·
The problems with dotfile locking are: 1. A crash risks leaving the lock file in place; it must be manually removed or else you hang forever. 2. The same home
by ridiculous_fish 5y ago
The problems with dotfile locking are:
1. A crash risks leaving the lock file in place; it must be manually removed or else you hang forever.
2. The same home directory may be local and remote on different machines, meaning different locking protocols.
I am considering a mode where the database is loaded fully into memory, and writes are atomically saved via the classic adjacent-file-renamed mechanism. You risk losing data due to races, but it can't corrupt the database.