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

[WIP] Locks + cache for multiple revisions #8510

Closed
wants to merge 68 commits into from

Conversation

jgsogo
Copy link
Contributor

@jgsogo jgsogo commented Feb 16, 2021

Changelog: (Feature | Fix | Bugfix): Describe here your pull request
Docs: https://github.com/conan-io/docs/pull/XXXX

Requirements

  • multiple revisions
  • locking mechanism (threads and processes)
  • LRU implementation
  • use deterministic folders
  • shortest paths as possible
  • sqlite3 rollback mechanism and blocks
  • ...

Keep in mind:

#5513


class RWLock(object):
def __init__(self, resource: str, interprocess_lock: str):
self.w_lock = threading.Lock()
Copy link
Member

Choose a reason for hiding this comment

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

I am checking possible multi-threading race conditions, and given the structure of the program, typical operation (parallel uploads, parallel downloads), etc., we can guarantee by the business logic that multithreaded operations within the same process will not collide or produce race conditions with itself. Thus, lets simplify this, leaving only the interprocess lock, the simplicity will pay off

@memsharded
Copy link
Member

The work here is being continued in #8796

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.

None yet

2 participants