GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [MRESOLVER-521] Improve congested file locks behaviour by cstamas · Pull Request #455 · apache/maven-resolver

Conversation

@cstamas

@cstamas cstamas commented Apr 2, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

All reactions
@cstamas
Improve congested file locks behaviour
fe498bd
Instead to immediately give up and sleep, they will
sit a while to enter critical region. This is important
for "hot" locks.
@cstamas cstamas self-assigned this Apr 2, 2024
@cstamas
cstamas requested a review from gnodet April 2, 2024 11:47
@cstamas cstamas changed the title Improve congested file locks behaviour [MRESOLVER-521] Improve congested file locks behaviour Apr 2, 2024
@cstamas
cstamas marked this pull request as ready for review April 2, 2024 12:21
@cstamas
cstamas requested review from michael-o, rmannibucau and slawekjaranowski April 2, 2024 12:44
gnodet
gnodet approved these changes Apr 3, 2024
View reviewed changes
@cstamas
cstamas merged commit 089796b into apache:master Apr 3, 2024
@cstamas
cstamas deleted the improve-fs-locks-congestion-handling branch April 3, 2024 11:38
cstamas added a commit to cstamas/maven-resolver that referenced this pull request Apr 10, 2024
@cstamas
[MRESOLVER-522] Improve congested file locks behaviour (apache#455)
a26855e
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
@cstamas
[MRESOLVER-522] Improve congested file locks behaviour (#455) (#461)
b225076
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
@jira-importer

jira-importer commented Jun 13, 2025

Copy link
Copy Markdown

Resolve #1209

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

1 similar comment
@jira-importer

jira-importer commented Jun 13, 2025

Copy link
Copy Markdown

Resolve #1209

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gnodet gnodet gnodet approved these changes
@michael-o michael-o Awaiting requested review from michael-o
@rmannibucau rmannibucau Awaiting requested review from rmannibucau
@slawekjaranowski slawekjaranowski Awaiting requested review from slawekjaranowski

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@cstamas cstamas

Labels

None yet

Projects

None yet

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.

3 participants

@cstamas @jira-importer @gnodet
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.