dvc: .dvc/lock and sqlite lock on NFS and CIFS
See original GitHub issueAs it turns out, regular locks can’t be relied on when dvc is running on NFS or CIFS. See https://github.com/iterative/dvc/issues/1823 and https://discordapp.com/channels/485586884165107732/485596304961962003/570270243964846081 .
There are workarounds such as adding proper mnt options or moving dvc project outside with an external cache directory at NFS/CIFS mount, but it would be great to mitigate such issues in general. Here are a few ways to go about it:
One way to go about it is to use git-like locks (which, if I recall correctly, are using symlinks as an atomic way lock/unlock a file). In that case, we would have to use an unlocked sqlite db relying on our .dvc/lock
(or maybe introduce a separate special lock specifically for a db).
Issue Analytics
- State:
- Created 4 years ago
- Comments:28 (21 by maintainers)
Top Results From Across the Web
Internal Files | Data Version Control - DVC
It contains a SQLite state database that stores hash values for files ... The files themselves are backups of the dvc.lock file that...
Read more >File Locking And Concurrency In SQLite Version 3
SQLite Version 3.0.0 introduced a new locking and journaling mechanism ... Locking and concurrency control are handled by the pager module.
Read more >SqLite3 NFS mount issue with locking - can I use something ...
I have read that an option called nobrl can help this issue when the file system in question is CIFS. (its an option...
Read more >Best system to serve sqlite databases to webservers over a ...
If you have any Windows in the mix, CIFS (Samba) is the way to go, but in an all-linux environment, NFS. That being...
Read more >SQLite recommends against sharing it on NFS for multiple ...
This is because fcntl() file locking is broken on many NFS implementations. You should avoid putting SQLite database files on NFS if multiple...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The questions need to be answered:
.dvc
?Some takeouts from discussion with @efiop:
nolock
option, use those locks around sqlite and in place of any current locks.open(O_EXCL | O_CREAT | ...)
locks, which don’t work on pre v3 NFS.