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

Fix bug which caused startup to hang if the clock was wound back since a previous session #29558

Merged
merged 3 commits into from
Mar 24, 2025

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Mar 20, 2025

If a previous session terminated uncleanly, and then the clock is wound back, we could be waiting a very long time for the previous session's claim to expire.

We can fix this by simply treating a future claim the same as "now", and waiting for the normal stale timeout.

We also reduce the "stale" timeout from 30 seconds to 15 seconds, to reduce the amount of time we sit looking at a spinner.

Fixes: #28168

richvdh added 2 commits March 20, 2025 22:18
30 seconds staring at a spinner while we wait for a stale lock to expire is
rather painful. Pretty sure 15 seconds will be fine.
If a previous session terminated uncleanly, and then the clock is wound back,
we could be waiting a very long time for the previous session's claim to
expire.

We can fix this by simply treating a future claim the same as "now", and
waiting for the normal stale timeout.
@richvdh richvdh requested a review from a team as a code owner March 20, 2025 22:24
@richvdh richvdh changed the title SessionLock: deal with the clock having been wound back Fix bug which caused startup to hang if the clock was wound back since a previous session Mar 20, 2025
Copy link
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

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

Looks sane otherwise

@richvdh richvdh added this pull request to the merge queue Mar 24, 2025
Merged via the queue into develop with commit f3653ab Mar 24, 2025
32 checks passed
@richvdh richvdh deleted the rav/fix_session_lock branch March 24, 2025 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Impossible to continue after "Element is open in another window"
2 participants