fix(lockservice): refine keeper bind refresh on keep failures#24384
Merged
mergify[bot] merged 3 commits intoMay 14, 2026
Merged
Conversation
Limit response-level keep-remote-lock bind refreshes to bind-related errors and deduplicate bind refresh checks within one keeper pass. Add context for bind touch intents used by active txn fencing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
There was a problem hiding this comment.
Pull request overview
This PR hardens lockservice’s keeper failure-path behavior for KeepRemoteLock by reducing unnecessary allocator bind refreshes while keeping the bind-change fencing correctness introduced in #24363.
Changes:
- Deduplicates remote bind refresh checks within a single keeper pass to avoid repeated refresh attempts for the same stale bind.
- Restricts bind refresh on
KeepRemoteLockresponse errors to bind-related error codes (ErrLockTableBindChanged/ErrLockTableNotFound). - Clarifies
tableBindIntents’ purpose (intent-only bind tracking to support fencing for failed/in-flight attempts), and adjusts keeper tests accordingly.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pkg/lockservice/txn.go | Comment/field formatting update clarifying intent-only bind tracking used by bind-change fencing. |
| pkg/lockservice/lock_table_keeper.go | Adds per-pass dedup for refresh checks and gates refreshes to bind-related KeepRemoteLock response errors. |
| pkg/lockservice/lock_table_keeper_test.go | Updates keeper failure test to exercise the new “refresh only on bind-related errors” path using ErrLockTableNotFound. |
Reuse the keeper bind scratch slice capacity and add a negative test to ensure non-bind KeepRemoteLock response errors do not trigger bind refreshes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
iamlinjunhong
approved these changes
May 14, 2026
Contributor
Merge Queue Status
This pull request spent 59 minutes 18 seconds in the queue, including 58 minutes 47 seconds running CI. Required conditions to merge
|
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.
What type of PR is this?
Which issue(s) this PR fixes:
Refs #24346
What this PR does / why we need it:
This is a small follow-up hardening change after #24363 merged. It keeps the data-consistency fix intact while making the keepRemoteLock failure path more conservative:
ErrLockTableBindChanged/ErrLockTableNotFound)This avoids broadening failure-path behavior on main while preserving the OOM/stale-bind correctness closure for #24346.
Validation
go test ./pkg/lockservice -count=1 -timeout=5m