Skip to content

More granular read-write lock requests in the run() and reproduce() methods of the Stage class #5815

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

Merged
merged 7 commits into from
Aug 9, 2021

Conversation

maximerischard
Copy link
Contributor

  • ❗ I have followed the Contributing to DVC checklist.

  • [] πŸ“– If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here.

I took a stab at making the read-write lock requests in the run() and reproduce() methods of the Stage class more granular, in order to address issues #5795 and #5007. This makes the β€œmanually parallel” execution of dvc steps possible.

Instead of pre-emptively grabbing read locks on the dependencies
and write locks on the outputs when calling the run() method,
delegate the locking mechanism to other methods.
This results in more selective locking that is less likely
to cause a LockError when executing steps in parallel.
@pared pared self-assigned this Jul 16, 2021
@pared
Copy link
Contributor

pared commented Jul 16, 2021

@maximerischard sorry for keeping you waiting, I assigned myself to prevent that in the future.

@efiop efiop self-assigned this Jul 27, 2021
Copy link
Contributor

@efiop efiop left a comment

Choose a reason for hiding this comment

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

Thank you for your patience and thank you for the patch! πŸ™

@efiop efiop unassigned pared Aug 9, 2021
@efiop efiop requested a review from a team as a code owner August 9, 2021 22:25
@efiop efiop requested review from pared and removed request for pared August 9, 2021 22:25
@efiop efiop merged commit 63b710b into iterative:master Aug 9, 2021
@efiop efiop added the bugfix fixes bug label Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix fixes bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants