-
Notifications
You must be signed in to change notification settings - Fork 1.3k
dvc: switch to flufl lock #2461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This locks employs hardlink trick, which works on NFS and alike unlike fcntl/open locks. Closes treeverse#1918.
de8d4e3 to
9111bf5
Compare
|
So things still might not work under Python 2 or very old sqlite3 version. Which is an issue than will solve itself ). |
|
@Suor FYI: tests on py2.7 on windows are failing. |
dvc/updater.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't set lifetime here, is there some default value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, 5 seconds. Plus 10 seconds, which flufl uses internally to defend against time desync.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is not acceptable, I can see it taking that long for the updater on bad network. Just set the longest time by default in Lock and don't configure it unnecessarily each time you use Lock. It is the way our old locks worked, it should stay that way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Suor ?
|
Reverted to |
Return to zc.lockfile lock in Python 2, NFS is not supported there anyway since sqlite3 doesn't support URIs.
| tmp_dir (str): a directory to store claim files. | ||
| """ | ||
|
|
||
| def __init__(self, lockfile, lifetime=None, tmp_dir=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for setting a long default lifetime. Don't see this one used anywhere now
| def __init__(self, lockfile, lifetime=None, tmp_dir=None): | |
| def __init__(self, lockfile, tmp_dir=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the record: will remove this myself right after merge to move along faster.
This locks employs hardlink trick, which works on NFS and alike unlike
fcntl/open locks.
Closes #1918.