Range-lock conflicts can strand waiters in stale queues A waiter that moves to a new…
- User
Range-lock conflicts can strand waiters in stale queues
A waiter that moves to a new range conflict must no longer remain in stale queues. Cleanup must preserve unrelated lock state, wake the next eligible waiter when necessary, and continue to work when the previous key disappeared or was recreated.
Interface
No new interfaces are introduced.
- Assistant
Let me check the waiter queue implementation and git history for context.
- Assistant
Now let me look at the btree storage and the lock context type:
- Assistant
Let me check
setBlockedin txn.go to confirm waiter status transitions: - Assistant
Build passes. Now let me look at the existing tests to model a regression test:
- Assistant
Now let me check test helpers available:
- Assistant
All pass. Now let me verify the integration test actually catches the bug by temporarily reverting the fix:
- Assistant
The test fails on the old code (txn5's lock stranded until context timeout) and passes with the fix. Now run the full lockservice suite:
- Assistant
The failure didn't reproduce on rerun. Let me dig into whether my new tests cause it — run them repeatedly under race:
- Assistant
While the race suite runs, let me review the complete diff:
- Assistant
The diff looks complete. Let me wait for the full race suite to finish:
- Assistant
Formatting is clean. Now I'll wait for the background race suite to complete:
- Assistant
closeWaiterremains in use only by the row-granularity error path indoLock, which is unchanged. Now I'll wait for the race suite result before summarizing. - Assistant
The race suite is still running; the monitor will notify me when it completes. Standing by for the result.
- Assistant
Both changes are contained in
pkg/lockservice/lock_table_local.go(fix) andpkg/lockservice/lock_table_local_test.go(regression tests). Waiting on the full-racesuite to confirm no regressions before giving the final summary. - Assistant
The tail-only capture hid the failing test. Rerun with full output:
- Assistant
I'll wait for the background run to complete — it will notify with the failing test details.
- Assistant
The log buffers until completion. Waiting for the background task notification.
- Assistant
Waiting for the full race suite to complete.
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.