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

Avoid concurrency issues with load_metadata function #8517

Closed
wants to merge 2 commits into from

Conversation

jgsogo
Copy link
Contributor

@jgsogo jgsogo commented Feb 17, 2021

Changelog: omit
Docs: omit

Use the locking mechanism to read the metadata file, not only with the contextmanager when you are going to modify it.


I'm trying to figure out which could be the worst scenario that leads to the assert failure:

assert node.prev, "PREV for %s is None: %s" % (str(pref), metadata.dumps())

@jgsogo
Copy link
Contributor Author

jgsogo commented Feb 17, 2021

Bitten by harlowja/fasteners#26 and the layout we are using to store the lockfiles and determine if a package exists. Not sure if it will require too many changes 😞

@jgsogo
Copy link
Contributor Author

jgsogo commented Feb 17, 2021

Alternatives:

  • tell fasteners to store the files somewhere else
  • force removal of the metadata.json.lock file if it is the only one in the folder here (we will face a concurrency challenge):

@jgsogo jgsogo self-assigned this Feb 23, 2021
@memsharded
Copy link
Member

Obsolete, closing

@memsharded memsharded closed this Mar 3, 2023
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.

2 participants