GeezerVison is showing github.com — [MRESOLVER-521] Improve congested file locks behaviour by cstamas · Pull Request #455 · apache/maven-resolver
Conversation
cstamas
commented
Apr 2, 2024
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Instead to immediately give up and sleep, they will sit a while to enter critical region. This is important for "hot" locks.
Explanation: currently a "loser" will immediately give up and will go to sleep 100ms if cannot enter critical region, even if winner exits critical region within next 5ms. The retry is needed to ensure that it is retried as much as given time/unit takes, that was before consumed by constant retries+sleeps. The logic still works, as if tryLock spends time/unit waiting on criticalRegion (which is possible only on VERY HIGHLY congested locks), there will be no retry happening.
https://issues.apache.org/jira/browse/MRESOLVER-521
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Instead to immediately give up and sleep, they will
sit a while to enter critical region. This is important
for "hot" locks.
cstamas
changed the title
Improve congested file locks behaviour
[MRESOLVER-521] Improve congested file locks behaviour
Apr 2, 2024
cstamas
added a commit
to cstamas/maven-resolver
that referenced
this pull request
Apr 10, 2024
Instead to immediately give up and sleep, they will sit a while to enter critical region. This is important for "hot" locks.
Explanation: currently a "loser" will _immediately give up_ and will go to sleep 100ms if cannot enter critical region, even if winner exits critical region within next 5ms. The retry is needed to ensure that it is retried as much as given time/unit takes, that was before consumed by constant retries+sleeps. The logic still works, as if tryLock spends time/unit waiting on criticalRegion (which is possible only on VERY HIGHLY congested locks), there will be no retry happening.
---
https://issues.apache.org/jira/browse/MRESOLVER-522
cstamas
added a commit
that referenced
this pull request
Apr 10, 2024
Instead to immediately give up and sleep, they will sit a while to enter critical region. This is important for "hot" locks.
Explanation: currently a "loser" will _immediately give up_ and will go to sleep 100ms if cannot enter critical region, even if winner exits critical region within next 5ms. The retry is needed to ensure that it is retried as much as given time/unit takes, that was before consumed by constant retries+sleeps. The logic still works, as if tryLock spends time/unit waiting on criticalRegion (which is possible only on VERY HIGHLY congested locks), there will be no retry happening.
Backport of 089796b
---
https://issues.apache.org/jira/browse/MRESOLVER-522
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
1 similar comment
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
gnodet
gnodet approved these changes
michael-o
Awaiting requested review from michael-o
Uh oh!
There was an error while loading. Please reload this page.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|