Repository navigation
🐛 fix(lease): report lost claims through release - #1069
Merged
gaborbernat merged 2 commits intoNov 21, 2026
Merged
Conversation
gaborbernat
marked this pull request as draft
November 20, 2026 15:32
gaborbernat
force-pushed
the
fix/soft-lease-hardlink-g4k
branch
from
November 20, 2026 15:42
f205963 to
832a3ab
Compare
gaborbernat
marked this pull request as ready for review
November 20, 2026 17:33
gaborbernat
marked this pull request as draft
November 20, 2026 19:33
gaborbernat
force-pushed
the
reimplement/a2
branch
from
November 20, 2026 19:52
d12c577 to
ee275b9
Compare
gaborbernat
force-pushed
the
fix/soft-lease-hardlink-g4k
branch
from
November 20, 2026 19:52
832a3ab to
e2b0475
Compare
gaborbernat
marked this pull request as ready for review
November 20, 2026 21:35
gaborbernat
marked this pull request as draft
November 20, 2026 22:00
A surviving hard link kept the old lease inode alive after the lock path disappeared, masking claim loss. Distinguish that case from a moved parent directory before treating an unnamed marker as still live. Fixes tox-dev#1013
The heartbeat treats its first marker mismatch as provisional because a peer's exchange may be rolled back. Release could stop it before a second check and leave a superseded holder's compromise unset. Check the held inode before clearing the claim. An unlinked inode proves the marker change survived the exchange; a linked inode or failed probe does not. Fixes tox-dev#1026
gaborbernat
force-pushed
the
fix/soft-lease-hardlink-g4k
branch
from
November 20, 2026 23:58
e2b0475 to
be6d538
Compare
gaborbernat
marked this pull request as ready for review
November 21, 2026 00:17
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.
A hard link can keep a lease's old marker alive after its public name disappears. The previous heartbeat treated any surviving link as evidence that the marker remained. The heartbeat now checks the marker's parent path. If the directory still exists at that path and the marker is gone, the heartbeat reports the lost claim through
on_compromise(#1013).On POSIX, release checks for claim loss before closing the descriptor. If a peer took the claim between heartbeats, callers can read
compromiseafter the protected work ends (#1026). Only the heartbeat invokes the callback. A rename still in progress can roll back, so release records a loss only when it can confirm that the old marker is gone or replaced.Two consecutive missing-marker checks trigger
marker-missing. A missing parent permits refresh because the marker may have moved with it. Persistent parent lookup errors can producerefresh-failed, including when a Windows junction is removed.The November 2026 filelock review reported ANT-2026-G4KJZN91 and ANT-2026-TWBZ8VR8.
Fixes #1013, fixes #1026.