Repository navigation
Print the --transaction pin MOVED/ASK/disconnect warning once - #893
Conversation
m_txn_pin_lost_warned was reset at every new rotation, so a slot migration printed one "pin connection received MOVED mid-rotation" warning per interrupted rotation: 431 lines in a 25 s run. The MOVED and ASK counts are already in the stats; print each run's first one only, and say so in the message. The test answers every 3rd SET of a --transaction run with -MOVED from a scripted one-node cluster; master prints the warning 33 times. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🤖 Automated first-pass review — a human maintainer's review is still required before merge. Thanks for this. The fix is small and the test fails on master (33 warnings) and passes here (1), which is the bar we want. A couple of questions:
Once-per-process with (would file this as a comment, not a formal block) |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1eea7a7. Configure here.
The once-per-process flag also gated the disconnect site's pin release and wake-up of the other connections in hold_pipeline(), not just the log line. Keep that bookkeeping on the per-rotation m_txn_pin_lost_warned and gate only the message. Give the disconnect, MOVED and ASK warnings their own flag so one cannot silence the others, and say "rotations": later interrupted rotations are inaccurate too. The test also checks the exit code. Co-Authored-By: Claude Opus 5.5 <[email protected]>
On master a MOVED or ASK on the pin sets m_txn_pin_lost_warned, which also makes a disconnect of that pin later in the same rotation skip the release in hold_pipeline(). Keep that, so only the messages differ from master. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Good catch, that wasn't intended. Fixed in 172dc7e: the MOVED and ASK sites set |

Fixes #649.
During a slot migration, a cluster
--transactionrun printed--transaction pin connection (id=N) received MOVED mid-rotation ...once for every interrupted rotation, which was 431 lines in the issue's 25 s run.m_txn_pin_lost_warnedis reset at the start of every rotation, so it only stopped repeats within one rotation.Each of the three pin warnings (disconnect, MOVED and ASK mid-rotation) now has its own once-per-process flag, so one can't silence another. Each warning's first occurrence is still printed, now ending in
(reported once), and the MOVED/ASK counts stay in the MOVED/sec and ASK/sec columns. Only the messages are limited: at the disconnect site, releasing the pin and waking the other connections still happen once per rotation underm_txn_pin_lost_warned, as before. Like the missing-owner warning, these are once per process, including across--run-countruns.Test:
test_transaction_moved_warning_printed_onceintests/test_cluster_slots_bad_reply.py. Its scripted one-node cluster answers every 3rd SET of a--transactionMULTI/SET/EXEC run with-MOVED(to itself). With master'scluster_client.cppthe warning is printed 33 times, and with this change once.Sanitized
make checkpasses, the test file passes 21/21, and clang-format is clean.🤖 Generated with Claude Code
Note
Low Risk
Logging-only change with existing pin-release behavior preserved; covered by a new integration test.
Overview
Fixes #649: cluster
--transactionruns during slot migration no longer flood stderr with repeated pin warnings.m_txn_pin_lost_warnedstill resets each rotation and drives pin release / sibling wakeups as before; only the log lines are gated by three separate once-per-processstd::atomic<bool>flags (disconnect, MOVED, ASK mid-rotation). Each warning still fires on first occurrence, now ending with (reported once); MOVED/ASK rates in stats are unchanged.Adds
test_transaction_moved_warning_printed_once, which scripts every 3rd SET as-MOVEDand asserts a single received MOVED mid-rotation line.Reviewed by Cursor Bugbot for commit 172dc7e. Bugbot is set up for automated code reviews on this repo. Configure here.