Skip to content

exp: add a retry when removing temporary refs to avoid FileLocked errors #10840

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

skshetry
Copy link
Collaborator

We have per-ref rwlocks set. But they do not prevent conflicts when refs are stored in packed-refs, as multiple processes could be modifying the same file simultaneously.

On #10673, this is triggering FileLocked errors.

Wrap ref removal in a retry loop (10 attempts, 0.1s delay) to mitigate these race conditions.

@github-project-automation github-project-automation bot moved this to Backlog in DVC Aug 14, 2025
@skshetry skshetry moved this from Backlog to Review In Progress in DVC Aug 14, 2025
We have per-ref rwlocks set. But they do not prevent conflicts
when refs are stored in packed-refs, as multiple processes
could be modifying the same file simultaneously.

On #10673, this is triggering `FileLocked` errors.

Wrap ref removal in a retry loop (10 attempts, 0.1s delay) to
mitigate these race conditions.
@skshetry skshetry force-pushed the 10673-retry-remove-ref branch from d1b2573 to 697472c Compare August 14, 2025 13:13
@skshetry skshetry self-assigned this Aug 15, 2025
@skshetry skshetry added A: experiments Related to dvc exp bugfix fixes bug labels Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: experiments Related to dvc exp bugfix fixes bug
Projects
Status: Review In Progress
Development

Successfully merging this pull request may close these issues.

1 participant