Repository navigation
test(logservice): recover bounded gossip fixture bind collisions - #30029
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: Assessment: request_changes Reviewed the complete test-only delta. The bounded retry design preserves existing gossip assertions, but loses partial-cohort cleanup when a constructor panics. Model: Session:
Validation:
Limitations:
|
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 99755b8a1bea988657fab50a505c0bcc260900ab
Assessment: request_changes
Reviewed the complete test-only delta. The bounded retry design preserves existing gossip assertions, but loses partial-cohort cleanup when a constructor panics.
Model: gpt-6-astra / xhigh
Session: 01a12d8f-7dea-77c2-a565-38d45b5564e4 · slot 0 · generation 0
- P2
pkg/logservice/gossip_fixture_test.go:74: After one node starts, another listener claims a later node's LogServiceListenAddr. morpc.server.Start logs Fatal on the bind failure; WithServerLogger installs a WriteThenPanic logger, so start(cfg) panics instead of returning an error.
Impact: The helper skips rollback, and the caller has not yet registered its cleanup defer. NewService closes the failing instance, but previously started nodes and cohort runtime registrations remain live during unwinding. The old construction loop had a protecting defer. Restore deferred rollback until ownership transfers, and cover constructor panic cleanup.
Evidence: The reachable panic path is service.go:206,227 -> common/morpc/server.go:33,187 -> logutil/api.go:161. An unchanged-source helper extraction reproduced starts=2, cleanup calls=0, earlier node closed=false. The previous deferred-owner control and returned-bind-error control passed. See attempt-1/helper-probe.log and helper-probe-provenance.json. Existing real-listener regressions inject only the gossip endpoint.
Validation:
-
Reviewed both changed files, configuration allocation, retry/cancellation/error handling, service ownership, runtime replacement protection, and retained convergence/restart assertions.
-
Frozen HEAD and clean source status verified; diff whitespace and changed-file formatting checks passed.
-
Standalone ownership probe failed the panic-cleanup invariant; both controls passed. This used the exact helper with minimal service/configuration stubs.
-
Author reports normal, race and coverage passes for all three real collision cases. Relevant fixture and constructor code is unchanged from candidate 020b997. Frozen CI remained pending.
Limitations:
-
The RPC-bind trigger was established by source tracing; native integration tests were not independently executed. Toolchain bootstrap failed, and repository provenance verification found no native stamp.
-
The linked issue body and fixture timing measurements were absent from the supplied evidence.
|
mo-bot work · Commit: new same-head PR feedback/CI evidence requires a fresh task |
|
mo-bot work · Commit: Implemented deferred rollback and panic/Goexit coverage. Package validation passed, but native execution disproved the design’s RPC-bind panic premise; R4 needs revision. |
|
mo-bot work · Commit: Accepted the complete committed candidate. The repair and validation meet the design; no material blocker remains. Remote CI is pending. Verified commit: 77f79d6; fresh CI is pending |
|
mo-bot review · Commit: Assessment: approve The complete test-only delta preserves gossip assertions and provides bounded startup retry with correct cohort ownership and rollback. The prior panic/Goexit cleanup concern is resolved. No actionable findings remain. Model: Session: Validation:
Limitations:
|
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 77f79d619ddb88d209d70f9de82980f66921339f
Assessment: approve
The complete test-only delta preserves gossip assertions and provides bounded startup retry with correct cohort ownership and rollback. The prior panic/Goexit cleanup concern is resolved. No actionable findings remain.
Model: gpt-6-astra / xhigh
Session: 01a12d8f-8e48-7622-ad17-b605f08450ce · slot 1 · generation 0
Validation:
-
Verified frozen HEAD, clean source and exact patch equality; reviewed all three changed files and their constructor, allocator, runtime-registry and shutdown owners.
-
Checked cancellation, exhaustion, allocation failures, cleanup failures, panic identity, Goexit and runtime replacement. Functional gossip assertions and same-config restart remain unchanged.
-
The exact source-extracted startup helper passed 100 race-enabled runs, including unwinding after an earlier failed generation, ownership transfer and exactly-once cleanup.
-
Changed-file formatting and diff whitespace checks passed.
-
Reused relevant frozen author-reported native collision, race, coverage and package/caller evidence. Checked all technical review comments against current code.
Limitations:
-
Native tests were not independently executed: retained artifacts lack a provenance stamp, and local Go is older than the repository requirement. The helper probe used minimal stubs and does not establish native constructor or socket behavior.
-
Frozen CI remains in progress. Author reports identify the final repaired commit, but detailed current-head native logs were not supplied.
-
Independent linked-issue text and before/after fixture timing measurements were unavailable.
What type of PR is this?
Which issue(s) this PR fixes:
Closes #29986
What this PR does / why we need it:
Port probes close before gossip services bind, allowing another listener to claim a selected endpoint. Bound initial construction to three attempts on verified bind collisions. Close partial cohorts and remove matching runtime registrations before regenerating endpoints and seeds. Allocation errors return partial ownership for cleanup; non-bind errors, cancellation, rollback failures and persistent collisions remain failures.
Preserve topology, convergence, replica-addition and direct same-config restart assertions. Real-listener regressions cover late-node collision, an earlier node collision and an occupied injection endpoint, retaining actual errors and verifying recovery and cleanup. Production APIs and dependencies are unchanged.
Validation used Go 1.27.1, CGo enabled and verified native libraries:
020b99784bd4without material findings.Local tests used a private mount/network namespace. Remote CI remains pending.
Closes #29986