Skip to content

fix(lockservice): refine keeper bind refresh on keep failures#24384

Merged
mergify[bot] merged 3 commits into
matrixorigin:mainfrom
LeftHandCold:fix-keep-remote-bind-refresh-main
May 14, 2026
Merged

fix(lockservice): refine keeper bind refresh on keep failures#24384
mergify[bot] merged 3 commits into
matrixorigin:mainfrom
LeftHandCold:fix-keep-remote-bind-refresh-main

Conversation

@LeftHandCold
Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

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:

  • deduplicate allocator refresh checks for the same stale bind within a single keeper pass
  • only refresh binds for bind-related response errors (ErrLockTableBindChanged / ErrLockTableNotFound)
  • clarify the intent-only bind tracking comment used by active txn fencing

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

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>
Copilot AI review requested due to automatic review settings May 13, 2026 10:52
@qodo-code-review
Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 KeepRemoteLock response 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.

Comment thread pkg/lockservice/lock_table_keeper.go Outdated
Comment thread pkg/lockservice/lock_table_keeper.go
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>
@matrix-meow matrix-meow added size/M Denotes a PR that changes [100,499] lines and removed size/S Denotes a PR that changes [10,99] lines labels May 14, 2026
@LeftHandCold LeftHandCold requested a review from Copilot May 14, 2026 03:20
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@mergify mergify Bot added the queued label May 14, 2026
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 14, 2026

Merge Queue Status

  • Entered queue2026-05-14 04:10 UTC · Rule: main
  • Checks passed · in-place
  • Merged2026-05-14 05:10 UTC · at 3663236b0f1bd0b590e39dd8a4e93d513afa4fff · squash

This pull request spent 59 minutes 18 seconds in the queue, including 58 minutes 47 seconds running CI.

Required conditions to merge
  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • github-review-decision = APPROVED [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
    • check-neutral = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
    • check-skipped = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-neutral = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-skipped = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / SCA Test on Ubuntu/x86
    • check-neutral = Matrixone CI / SCA Test on Ubuntu/x86
    • check-skipped = Matrixone CI / SCA Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / UT Test on Ubuntu/x86
    • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
    • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(Optimistic/PUSH)
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(Optimistic/PUSH)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(Optimistic/PUSH)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
    • check-neutral = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
    • check-skipped = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Upgrade CI / Compatibility Test With Target on Linux/x64(LAUNCH)
    • check-neutral = Matrixone Upgrade CI / Compatibility Test With Target on Linux/x64(LAUNCH)
    • check-skipped = Matrixone Upgrade CI / Compatibility Test With Target on Linux/x64(LAUNCH)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Utils CI / Coverage
    • check-neutral = Matrixone Utils CI / Coverage
    • check-skipped = Matrixone Utils CI / Coverage

@mergify mergify Bot merged commit 332958d into matrixorigin:main May 14, 2026
22 of 24 checks passed
@mergify mergify Bot removed the queued label May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants