Skip to content

Np Fix - #18

Closed
arjunsk wants to merge 10 commits into
fengttt:fengttt-npfrom
arjunsk:feng-np
Closed

arjunsk wants to merge 10 commits into
fengttt:fengttt-npfrom
arjunsk:feng-np

Conversation

@arjunsk

@arjunsk arjunsk commented May 8, 2023

Copy link
Copy Markdown

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue #

What this PR does / why we need it:

@arjunsk arjunsk closed this May 25, 2023
@arjunsk
arjunsk deleted the feng-np branch May 25, 2023 04:18
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants