Skip to content

builder: Do not fail if we have a stale lock.#445

Merged
poolpOrg merged 1 commit into
mainfrom
mm/fix_stale_lock_deletion
May 28, 2026
Merged

builder: Do not fail if we have a stale lock.#445
poolpOrg merged 1 commit into
mainfrom
mm/fix_stale_lock_deletion

Conversation

@mathieu-plak
Copy link
Copy Markdown
Contributor

  • If we find a stale lock and kick it out, we need to continue the loop not fallthrough.

* If we find a stale lock and kick it out, we need to continue the loop
  not fallthrough.
@mathieu-plak
Copy link
Copy Markdown
Contributor Author

@claude review

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

LGTM — straightforward control-flow fix; the missing continue would have caused stale-lock cleanup to fall through into the exclusive-lock check using the just-deleted lock.

Extended reasoning...

Overview

Single-line change in snapshot/builder.go adding a continue statement after a stale lock is successfully deleted in the Builder.Lock() lock-acquisition loop. Without it, execution falls through to the subsequent if lock.Exclusive check using the stale lock object that was just removed, which could spuriously abort lock acquisition.

Security risks

None. The change does not affect authentication, crypto, or permissions — it only corrects a control-flow bug in stale lock reclamation. If anything, this slightly improves correctness around lock handling rather than introducing risk.

Level of scrutiny

Low. This is a one-line, mechanical fix to a clear logic bug — the bug is self-evident from reading the loop body, and the fix is the obvious correct shape (skip remaining checks for the lock you just deleted, proceed to the next iteration).

Other factors

PR description matches the code change exactly. No bugs reported by the bug hunting system. The author (mathieu-plak) explicitly requested review. The change is small, self-contained, and follows the established pattern within the same function.

@poolpOrg poolpOrg merged commit 164a75c into main May 28, 2026
8 checks passed
@poolpOrg poolpOrg deleted the mm/fix_stale_lock_deletion branch May 28, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants