Repository navigation
Conversation
Approved by: @heni02, @aressu1985
Fengttt Null Pointer
Co-authored-by: arjunsk <[email protected]> Co-authored-by: Feng Tian <[email protected]>
fengttt
pushed a commit
that referenced
this pull request
Nov 18, 2026
…atrixorigin#29649) ## What type of PR is this? - [x] BUG ## Which issue(s) this PR fixes: Fixes matrixorigin#29641 ## What this PR does / why we need it: Dragonboat NewNodeHost swallowed non-error panics, changed error-valued panic identity and leaked its directory lock on Goexit. NewTransport could also lose a returned child before constructor handoff. Pin Dragonboat to `abc3d2fce5a6b82b3a8a922c342fd1ec4afb8df3` (matrixorigin/dragonboat#18): each existing constructor owner keeps rollback until successful return and reuses its shared destruction path, preserving the primary failure. Transport Close now stops and joins the receiver before cleaning snapshot chunks. Otherwise a final valid receive can recreate `.receiving` storage after cleanup. The shared path covers ordinary shutdown and partial-start rollback, including returned child Close errors. Existing EngineConfig validation also rejects snapshot/close worker counts beyond Go's reflect.Select hard limit before acquisition. No new state machine, engine rollback framework or steady-state work is added. Remove the unused testutil import that blocked this branch's function-package compilation. This matches the existing correction on main (matrixorigin#29648), without pulling in its other changes. The MatrixOne regression exercises the actual public constructor with StrictMem LogDB injection and no bound ports, checking ordinary errors, panic identity, Goexit and exactly-once lock cleanup. Dependency regressions reuse existing fixtures and validate ownership handoff, receiver draining with both Close outcomes, terminal snapshot-directory cleanup, and unsafe configuration rejection before acquisition. Validation (Go 1.26.4, Linux/amd64): - Prior implementations fail the new ownership, terminal-directory and invalid-worker-count oracles; passing ordinary-error/success controls distinguish the defects. - Dragonboat config/root/transport packages normal and race PASS. Receiver-drain regression ×100 race PASS; nine actual-constructor QA cases PASS under race. - Full MatrixOne pkg/logservice normal/race PASS (104.129s/109.050s). Six existing function execution-contract tests normal/race PASS. Published-pin constructor and actual LOG create/close/retry consumers PASS under race. - Incremental formatting, vet and configured golangci-lint PASS for affected packages, with zero introduced findings. MatrixOne molint completes successfully; its two unchanged baseline checkunsafe diagnostics are outside this delta. - Downloaded dependency origin/checksums verified; 41 relevant module/config/root/transport files match the tested source byte for byte. Required gpt-6.1-sol/xhigh design, overall review and final pin/evidence reconciliation are recorded. Merge Dragonboat #18 first. Custom child Close retains its requirement to terminate and join callbacks; resources a factory never returns and arbitrary fatal/nonterminating destructors retain their existing contracts. Hard worker-count limits do not guarantee affordability of extremely large configurations. Local validation is distinct from hosted CI; new-head CI is not claimed green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Which issue(s) this PR fixes:
issue #
What this PR does / why we need it: