Repository navigation
[1.9.x] Prune FileLockNamedLock thread entries that hold no step - #2303
Open
slachiewicz wants to merge 1 commit into
Open
slachiewicz wants to merge 1 commit into
slachiewicz wants to merge 1 commit into
Conversation
threadSteps kept an entry for every thread that ever used the lock, including threads whose attempt timed out, for the lock's lifetime.
slachiewicz
marked this pull request as ready for review
November 8, 2026 22:39
gnodet-bot
approved these changes
Nov 12, 2026
gnodet-bot
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Correct thread-entry cleanup for FileLockNamedLock. Synchronization is sound — forgetThreadWithoutSteps() acquires the same criticalRegion lock guarding all threadSteps access, and only the owning thread ever modifies its own entry, so no race is possible. The doUnlock removal-before-check reordering is semantically equivalent to the old code because anyOtherThreadHasSteps() already excluded the current thread.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
FileLockNamedLock.threadStepskept an entry for every thread that ever used the lock, including threads whose attempt timed out, so it retainedThreadobjects for the lock's lifetime. Entries are now removed when a thread's step stack empties or its attempt fails. Same change as theFileLockNamedLockpart of #2300 on master.