Repository navigation
Conversation
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? |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 505f6ddaa958927034c78b0a9d0537d255ebba36
Assessment: request_changes
Reviewed the complete delta and producer/RSM/receiver lifecycle. Retaining bounded intent in ScheduleCommands is a coherent design, but heartbeat acknowledgment breaks the supported stop-then-start ordering contract.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1
- P2
pkg/hakeeper/rsm.go:629: An accepted controller batch contains StopReplica(shard=2, replica=10) followed by StartReplica(shard=2, replica=11) for the same TN. Its next heartbeat still reports replica 10.
Impact: The shard-only match discards the later start while delivering the preceding stop. The TN therefore removes its working shard without receiving the requested restart, and no pending start remains. Account for preceding stop/removal commands before treating the heartbeat as completion of a later start.
Evidence: TestReviewControllerOrderedRestart reproduces this through Controller.Dispatch and RSM Update/heartbeat entrypoints: candidate fails, exact base rsm.go control passes. Receipts: checks/1792195976158256475-4.json (exit 1) and checks/1792196018753409130-3.json (exit 0); corresponding head-controller-probe.log and base-controller-probe.log. The added stop-then-start table case uses an empty heartbeat and misses this reported-old-replica state.
Validation:
-
Isolation preflight passed; native prerequisites were built through repository Makefiles from fingerprinted frozen inputs. Source remained unchanged.
-
Full race suites passed for hakeeper, operator, TN checker and tnservice; five focused logservice integration tests passed.
-
TestStartReplica passed 100 race repetitions. Changed-package go vet, formatting and diff checks passed.
-
Commands, source fingerprints, exit receipts, terminal logs and diagnostic overlays were reconciled in /home/xupeng/.local/state/mo-bot/jobs/2f2e9549bcad08b99e6d21f3/attempt-1/evidence-audit.json. Audit receipt: checks/1792196133832844264-4.json.
Limitations:
-
The regression is an accepted ordered-batch contract failure reproduced at controller/RSM entrypoints, not a reproduction of the reported CI incident.
-
Mixed-version HAKeeper rollout and full distributed-cluster behavior were not tested; the linked issue body was absent from frozen evidence.
-
No performance benchmark was run. Added merging and retries affect control-plane work; SQL execution paths are unchanged.
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 9a558c2f33cc8b63fa70efcc967a5d6c5a190fd5
Assessment: request_changes
Reviewed the complete 12-file delta and producer/receiver lifecycle. Keeping retry ownership in the existing controller and restoring base RSM semantics is reasonable, but TN-only retry batches introduce a confirmed log-command delivery regression.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1586-7a01-9000-d45e20995cf8 · slot 1 · generation 1
- P2
pkg/hakeeper/checkers/tnservice/check.go:104: A checker pass schedules both a TN start and a log-replica start. The TN remains unreported, and the healthy log target sends its next heartbeat after another checker pass.
Impact: The new TN-only retry batch replaces the RSM's entire pending-command map, discarding the undelivered log start. The log checker suppresses re-emission while its operator remains active, delaying recovery until the generic 15-second expiry. Retry scheduling must preserve unrelated pending delivery; add mixed-service regression coverage.
Evidence: TestReviewTNRetryPreservesPendingLogStart exercises Coordinator.Check → RSM.Update → log heartbeat, following healthCheck's nonempty-batch proposal rule. Candidate returns no log command; restoring all changed production files to the base preserves it. The TN-already-running control passes both. Retained candidate-delivery.log/base-delivery.log and receipts checks/1792200683594918148-4.json (exit 1) / checks/1792200708300237427-3.json (exit 0) reproduce the difference.
Validation:
-
Isolation preflight passed. Native inputs and library hash matched the repository build inputs; source remained unchanged.
-
Independently reconciled exact-candidate retained normal/race and vet/molint runs for checker/operator packages, plus five-package incremental SCA reporting zero new issues.
-
Verified RSM production source is identical to the target base, closing the earlier heartbeat-ordering concern.
-
Commands, fingerprints, overlays, exit receipts and logs are reconciled in /home/xupeng/.local/state/mo-bot/jobs/57e19f5e4af7461720d62128/attempt-1/final-evidence-audit.json; audit receipt checks/1792200788756701300-4.json exited 0.
Limitations:
-
The regression uses production coordinator/RSM entrypoints, not a full distributed cluster or live rolling upgrade.
-
Performance assessment is structural: bounded retry state and additional control-plane work; no timing benchmark or direct SQL-path change.
-
The linked issue body was absent from frozen evidence; its stated contract was assessed from the PR description. Substantive CI jobs were pending.
|
mo-bot review · Commit: PR closed or head changed |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Review result
I re-reviewed head b45a8008eab510dca4a72811fd1543be99749da8 against 4.2-dev. I found no remaining blocking issue.
The two earlier findings are closed:
- The ordered TN stop-then-start case preserves both commands when the heartbeat still reports the old replica. Verified through Controller → RSM → heartbeat.
- A TN retry no longer drops suppressed pending Log work. Verified all seven pending Log command kinds (voting/non-voting start, add, remove, and bootstrap) through Coordinator → RSM → Log heartbeat. A negative control with the preservation branch disabled fails all seven assertions.
The exact-head local race run passed 12 top-level tests and 44 subtests across the affected checker, logservice, and operator packages. Exact-head CI run 38993706116 passed SCA, UT racing, coverage, and both multi-CN BVT jobs.
The implementation keeps retry ownership in the existing operator controller and reuses Log checker candidate rules; it adds no persistent or wire state. The extra work is in the HAKeeper control plane while a TN start is pending. No scale benchmark, mixed-version rollout, or full distributed packet-loss reproduction was run.
No blocking findings.
|
继续实测验证(2026-10-17): 4.2-dev main 结论:#30444 的 4.2 修复已验证;main 对应 #30445 仍未合并,整个 #30443 的报告范围尚未全部解决。保留 @XuPeng-SH 开发指派,不整体转测。仍使用 #30443 跟踪,没有为同一缺口新建重复 issue。 |
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Refs #30443. Parallel 4.2-dev fix: #30444. ## What this PR does / why we need it: A lost committed heartbeat response or a later unrelated legacy scheduling batch can discard a TN startup command. The controller owns its unfinished operator but previously dispatched only fresh operators, delaying recovery until the initial-shard timeout. Retry the existing singleton TN-add operator on each healthy checker pass. Its checker owns placement reservations and termination by reported startup, target loss, cancellation, or teardown; it does not allocate another replica for a pending shard. Different-ID reports cancel stale intent. Other operator kinds retain their existing expiry policy. A TN retry also preserves currently desired Log work that the Log checker suppressed as already executing. The owner-local projection reuses the existing parser for voting/nonvoting add, remove, start, and bootstrap candidates. It checks current epochs, working targets, add-slot bounds, and partial bootstrap progress; main also reuses its existing storage-incarnation exclusion. It does not replay retained TN removals or unrelated one-shot commands. Existing Log/TN pointers are admitted and emitted once per retry cohort using temporary linear pointer sets; ordinary fresh batches keep their normal admission cost. The RSM matches the target base byte for byte. Historical heartbeat consumption and snapshot replay are preserved. No Raft, protobuf, activation protocol, persistent queue, timer, worker, or SQL-path change is introduced. The additional candidate parsing/temporary pointer sets run only when a registered TN start requests a retry. Existing Preparing/Enabled ACK delivery remains the transport owner. Repeated mixed Log/TN proposals preserve equivalent pending command identities and queue bounds. Exact ACK retires TN work; a later retry receives a new identity until a real report arrives, and stale ACK cannot retire it. ### Validation Base: `65bcea5d24610dde1a21bb9f4dea1efd82a8ce50`; Linux/amd64, Go 1.27.1, matching branch native inputs. - Relevant owning packages passed normal UT and `go test -race -count=1`: coordinator/checkers, Log checker, operator; unchanged HAKeeper/TN-checker behavior retains matching-source prior normal/race evidence. - Real Coordinator → RSM → Log heartbeat regression covers pending TN, an already-running TN control, already-consumed Log response, and completion after a real report. The V2 mixed-service loss was reproduced before correction; clean 4.2 base passed its control. - Candidate tests cover all seven suppressed Log step kinds, stale membership/epoch/role, expired/missing targets, add-slot bounds, partial bootstrap, current-step progression, and terminal operations. Repeated cohorts retain one registration per pointer; obsolete TN removal is excluded. Main additionally checks changed storage incarnation and mixed Preparing/Enabled command identity. - Real LogService start/bootstrap/add/nonvoting-add/remove fixtures passed normal and race with duplicate deliveries. Existing matching-source TN receiver evidence covers duplicate/different-ID starts and cancellation/close. - Incremental SCA: **0 new issues** across all seven affected packages. `go vet` and `molint` passed for changed owning packages/receiver. Frozen historical snapshots still use unchanged RSM production code; prior recovery/replay evidence remains valid. - Independent design and final overall review: `gpt-6.1-sol` / `xhigh`. Retries require eventual delivery and viable targets. Existing epoch checks and replica identity make eligible control-plane retries idempotent; this is not an exactly-once guarantee. The fix preserves the extra TN-retry batch, without redesigning historical replacement between unrelated fresh batches. Performance evidence is structural and bounded command/operator assertions; no SQL benchmark or live rolling-upgrade test was run. The original CI incident's precise lost-response mechanism remains unproven. CI was not rerun or waited on.
What type of PR is this?
Which issue(s) this PR fixes:
Refs #30443. Parallel main fix: #30445.
What this PR does / why we need it:
A lost committed heartbeat response or a later unrelated legacy scheduling batch can discard a TN startup command. The controller owns its unfinished operator but previously dispatched only fresh operators, delaying recovery until the initial-shard timeout.
Retry the existing singleton TN-add operator on each healthy checker pass. Its checker owns placement reservations and termination by reported startup, target loss, cancellation, or teardown; it does not allocate another replica for a pending shard. Different-ID reports cancel stale intent. Other operator kinds retain their existing expiry policy.
A TN retry also preserves currently desired Log work that the Log checker suppressed as already executing. The owner-local projection reuses the existing parser for voting/nonvoting add, remove, start, and bootstrap candidates. It checks current epochs, working targets, add-slot bounds, and partial bootstrap progress; main also reuses its existing storage-incarnation exclusion. It does not replay retained TN removals or unrelated one-shot commands. Existing Log/TN pointers are admitted and emitted once per retry cohort using temporary linear pointer sets; ordinary fresh batches keep their normal admission cost.
The RSM matches the target base byte for byte. Historical heartbeat consumption and snapshot replay are preserved. No Raft, protobuf, activation protocol, persistent queue, timer, worker, or SQL-path change is introduced. The additional candidate parsing/temporary pointer sets run only when a registered TN start requests a retry.
Validation
Base:
e2c99334fd23b9260728695e29befd35ab26b454; Linux/amd64, Go 1.26.4, matching branch native inputs.go test -race -count=1: coordinator/checkers, Log checker, operator; unchanged HAKeeper/TN-checker behavior retains matching-source prior normal/race evidence.go vetandmolintpassed for changed owning packages/receiver. Frozen historical snapshots still use unchanged RSM production code; prior recovery/replay evidence remains valid.preallocsuggestions in unchangedoperator/builder.go; the identical diagnostics were reproduced on the clean target base. They are not incremental findings.gpt-6.1-sol/xhigh.Retries require eventual delivery and viable targets. Existing epoch checks and replica identity make eligible control-plane retries idempotent; this is not an exactly-once guarantee. The fix preserves the extra TN-retry batch, without redesigning historical replacement between unrelated fresh batches. Performance evidence is structural and bounded command/operator assertions; no SQL benchmark or live rolling-upgrade test was run. The original CI incident's precise lost-response mechanism remains unproven. CI was not rerun or waited on.