mirror of
https://github.com/xcat2/xcat-dep.git
synced 2026-12-03 15:47:02 +00:00
9f406f6e86bc4581f7145089eaa133e23de6e396
release deletes the owner metadata and marks the guard released before it
knows the removal can finish. With a live attached worker the rmdir fails,
and the lock is left holding workers and no owner. acquire then refuses it
for ever, correctly, because there is nothing there to validate. The sweep
has the same ordering: _remove deletes the metadata and then fails on the
workers directory, reports "kept", and leaves the same wreck. A take-over
recovers that very lock by itself, so the sweep was leaving it worse than
doing nothing.
A held lock is better than a half-released one. It is refused with a reason
and it recovers when its owner dies; the half-released one is permanent.
Four checks cover it, and each pair carries the half that keeps it honest.
release with a live worker: the lock and its metadata survive, and once the
worker exits the SAME guard finishes the release and a later acquire
succeeds. An owner that exits without releasing: the metadata it left is
intact, a later acquire is refused while the worker group exists and names
that group, and once both are gone the lock is recovered. The sweep with
completed worker records: the lock is removed, and a later acquire
succeeds. And a lock the sweep keeps must still carry its metadata, or
refusing to remove it is the same damage by another route.
Without the second assertion in each pair, a release that frees nothing and
a sweep that removes nothing would both pass.
Against 2fa0e8b1c, the revision this was reviewed at, 11 of the 98 checks
fail.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Description
No description provided
Languages
Perl
79.3%
JavaScript
6.3%
C
3.9%
Shell
3.1%
SQLPL
2%
Other
5.2%