Skip to content
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

Fix error caused by double-locking repo #117

Merged
merged 3 commits into from
Jan 15, 2021
Merged

Fix error caused by double-locking repo #117

merged 3 commits into from
Jan 15, 2021

Conversation

gammazero
Copy link
Contributor

This fixes #115.

The repo was being double-locked, once by the migration and once by opening the repo. However, on some platforms this double locking was not detected due to the combination of different locking implementations, and the defect was not detected by tests.

@gammazero gammazero requested a review from aschmahmann January 13, 2021 03:01
Copy link
Contributor

@aschmahmann aschmahmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Although it might be a good idea to pull fsrepo.Open out of the revertPins/transferPins functions and pass in the repo so that it's obvious we have the repo lock when we do mfsr.RepoPath(opts.Path).WriteVersion

@gammazero gammazero requested a review from aschmahmann January 15, 2021 05:40
@aschmahmann aschmahmann merged commit c07535c into master Jan 15, 2021
@aschmahmann aschmahmann deleted the fix/issue-115 branch January 15, 2021 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lockfile detection failure on Debian
2 participants