Repository navigation
test(logservice): cover WAL failure ordering - #28721
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? |
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? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Reviewed 7050460 against main b349fea. No concrete blocker found.
The complete diff is confined to driver_test.go: strengthened cleanup for the two existing worker-handoff cases, a shared intake/worker-close deadline oracle, and a new grouped pre-callback failure case. This is focused acceptance-test maintenance over the already merged production protocol, not a new lifecycle design or wire/storage change.
I traced the tests through onCommitIntents -> asyncCommit -> groupCommitter.Commit -> LogEntryWriter.Finish/NotifyDone and the production wait/Close paths. The new two-entry test exercises real pre-callback failure after the first entry was serialized, observes both original sentinel errors while fail-stop is still blocked, forbids backend Append, checks pending drain and unchanged committed watermark, and rechecks stable terminal errors after Close. The wait loop cannot accidentally supply the required pre-release notification because finishCommit is still behind that barrier. The completionObservedEntry hook observes DoneWithErr itself before its waitgroup completion, avoiding a false negative based only on whether a waiter goroutine happened to run.
The close test now spends part of one absolute budget stopping intake and keeps the append blocked past the remaining budget; it also distinguishes rejected submission from the still-owned in-flight append. Cleanup releases injected blockers before closing/joining and avoids freeing entries when accepted work has not drained. Shared sync.Once across factory-created clients removes duplicate channel-close risk. No production paths or old test assertions are removed; fixture/data scale is small and there is no added external service fixture.
Non-blocking limit: the close-bound oracle still uses real time with 100 ms scheduler slack, so it is not a virtual-time proof under arbitrary runner starvation. This does not undermine the deterministic failure-ordering barriers. Remote recovery/formal QA for the broader issue is explicitly separate from this package-level coverage.
Evidence: complete source/diff review and author-reported exact-content normal/race checks, 100 race iterations and a negative mutation removing worker NotifyError. I did not independently run those tests or inspect the author's private local evidence files. No native suite or CI wait was performed, and no source files were changed. Live head/base were rechecked before submission.
Merge Queue Status
This pull request spent 12 seconds in the queue, with no time running CI. ReasonThe pull request can't be updated
HintYou should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again. Tick the box to put this pull request back in the merge queue (same as
|
## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#28013 ## What this PR does / why we need it: Adds deterministic WAL driver acceptance coverage for the failure-ordering and lifecycle gaps identified after merged PR matrixorigin#28014. - Covers worker handoff and committer completion ordering with bounded release/join cleanup. - Verifies a shared absolute close deadline across intake and worker drain, without granting an in-flight append a synthetic success. - Exercises a real two-entry group pre-callback failure through `LogEntryWriter.Finish` and the production wait path; both waiters must receive the same sentinel before fail-stop release, `Append` must not run, and the committed watermark must not advance. - Includes a controlled negative mutation that removes worker `NotifyError`; the new barrier assertion fails before the normal implementation is restored. - No production code, SQL, protocol, or runtime behavior is changed. This follow-up depends on merged PR matrixorigin#28014 and does not modify its owner worktree. Validation bound to the current PR head `705046072e9e15e00ff60233611d73bf8903bcc6` (base `main@b349fea`): - Test file SHA256: `981c947cfe70564241f2a27f1bf03e204b72eec76c8670aab6d012ae64b2ba86`. - Focused and owning CGo normal/race tests for the four lifecycle/failure cases: PASS; the pre-callback ordering race stress also passes 100 iterations. The committed change preserves the exact tested file content; logs and the final delta are indexed in `/Users/violet/Documents/Codex/2026-09-11/matrixone-qa-followup/outputs/wal/REPORT.md` and `final-state.txt`. - `git diff --check`: PASS before commit; the final commit contains only `pkg/vm/engine/tae/logstore/driver/logservicedriver/driver_test.go` (90 insertions, 20 deletions relative to the published head). - Base behavior: PASS — the merged matrixorigin#28014 production implementation remains unchanged; the test gap was the missing pre-callback and lifecycle assertions. - Negative controls: PASS — removing `committer.NotifyError` fails the new waiter-order assertion; the production file was restored and is absent from the final diff. - BVT: N/A — the covered WAL driver failure ordering is package-internal and has no meaningful stable SQL/BVT entry point. The regression asserts waiter terminal errors, fail-stop ordering, append count, watermark, pending-wait drain, bounded close, and repeated `WaitDone` stability. QA required: yes — issue matrixorigin#28013 is marked `phase/testing` and covers failure, fail-stop, deadline, and cleanup behavior that requires lifecycle acceptance beyond package tests. Local QA evidence is preserved, but machine preflight, exact-head CI, maintainer review, remote multi-node/recovery validation, and formal QA remain pending. ## Remaining validation - Exact-head CI and maintainer review are pending. - Remote multi-node/recovery validation and formal QA are not run in this local test-only patch. - Machine preflight/Python 3.8 execution for the follow-up evidence is pending; environment failures remain separate from product-test failures. - Serializer `WriteTo` failure injection remains intentionally out of scope because no reachable production failure seam exists without a fake serializer. --------- Co-authored-by: XuPeng-SH <[email protected]>
## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#28013 ## What this PR does / why we need it: Adds deterministic WAL driver acceptance coverage for the failure-ordering and lifecycle gaps identified after merged PR matrixorigin#28014. - Covers worker handoff and committer completion ordering with bounded release/join cleanup. - Verifies a shared absolute close deadline across intake and worker drain, without granting an in-flight append a synthetic success. - Exercises a real two-entry group pre-callback failure through `LogEntryWriter.Finish` and the production wait path; both waiters must receive the same sentinel before fail-stop release, `Append` must not run, and the committed watermark must not advance. - Includes a controlled negative mutation that removes worker `NotifyError`; the new barrier assertion fails before the normal implementation is restored. - No production code, SQL, protocol, or runtime behavior is changed. This follow-up depends on merged PR matrixorigin#28014 and does not modify its owner worktree. Validation bound to the current PR head `705046072e9e15e00ff60233611d73bf8903bcc6` (base `main@b349fea`): - Test file SHA256: `981c947cfe70564241f2a27f1bf03e204b72eec76c8670aab6d012ae64b2ba86`. - Focused and owning CGo normal/race tests for the four lifecycle/failure cases: PASS; the pre-callback ordering race stress also passes 100 iterations. The committed change preserves the exact tested file content; logs and the final delta are indexed in `/Users/violet/Documents/Codex/2026-09-11/matrixone-qa-followup/outputs/wal/REPORT.md` and `final-state.txt`. - `git diff --check`: PASS before commit; the final commit contains only `pkg/vm/engine/tae/logstore/driver/logservicedriver/driver_test.go` (90 insertions, 20 deletions relative to the published head). - Base behavior: PASS — the merged matrixorigin#28014 production implementation remains unchanged; the test gap was the missing pre-callback and lifecycle assertions. - Negative controls: PASS — removing `committer.NotifyError` fails the new waiter-order assertion; the production file was restored and is absent from the final diff. - BVT: N/A — the covered WAL driver failure ordering is package-internal and has no meaningful stable SQL/BVT entry point. The regression asserts waiter terminal errors, fail-stop ordering, append count, watermark, pending-wait drain, bounded close, and repeated `WaitDone` stability. QA required: yes — issue matrixorigin#28013 is marked `phase/testing` and covers failure, fail-stop, deadline, and cleanup behavior that requires lifecycle acceptance beyond package tests. Local QA evidence is preserved, but machine preflight, exact-head CI, maintainer review, remote multi-node/recovery validation, and formal QA remain pending. ## Remaining validation - Exact-head CI and maintainer review are pending. - Remote multi-node/recovery validation and formal QA are not run in this local test-only patch. - Machine preflight/Python 3.8 execution for the follow-up evidence is pending; environment failures remain separate from product-test failures. - Serializer `WriteTo` failure injection remains intentionally out of scope because no reachable production failure seam exists without a fake serializer. --------- Co-authored-by: XuPeng-SH <[email protected]>
## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#28013 ## What this PR does / why we need it: Adds deterministic WAL driver acceptance coverage for the failure-ordering and lifecycle gaps identified after merged PR matrixorigin#28014. - Covers worker handoff and committer completion ordering with bounded release/join cleanup. - Verifies a shared absolute close deadline across intake and worker drain, without granting an in-flight append a synthetic success. - Exercises a real two-entry group pre-callback failure through `LogEntryWriter.Finish` and the production wait path; both waiters must receive the same sentinel before fail-stop release, `Append` must not run, and the committed watermark must not advance. - Includes a controlled negative mutation that removes worker `NotifyError`; the new barrier assertion fails before the normal implementation is restored. - No production code, SQL, protocol, or runtime behavior is changed. This follow-up depends on merged PR matrixorigin#28014 and does not modify its owner worktree. Validation bound to the current PR head `705046072e9e15e00ff60233611d73bf8903bcc6` (base `main@b349fea`): - Test file SHA256: `981c947cfe70564241f2a27f1bf03e204b72eec76c8670aab6d012ae64b2ba86`. - Focused and owning CGo normal/race tests for the four lifecycle/failure cases: PASS; the pre-callback ordering race stress also passes 100 iterations. The committed change preserves the exact tested file content; logs and the final delta are indexed in `/Users/violet/Documents/Codex/2026-09-11/matrixone-qa-followup/outputs/wal/REPORT.md` and `final-state.txt`. - `git diff --check`: PASS before commit; the final commit contains only `pkg/vm/engine/tae/logstore/driver/logservicedriver/driver_test.go` (90 insertions, 20 deletions relative to the published head). - Base behavior: PASS — the merged matrixorigin#28014 production implementation remains unchanged; the test gap was the missing pre-callback and lifecycle assertions. - Negative controls: PASS — removing `committer.NotifyError` fails the new waiter-order assertion; the production file was restored and is absent from the final diff. - BVT: N/A — the covered WAL driver failure ordering is package-internal and has no meaningful stable SQL/BVT entry point. The regression asserts waiter terminal errors, fail-stop ordering, append count, watermark, pending-wait drain, bounded close, and repeated `WaitDone` stability. QA required: yes — issue matrixorigin#28013 is marked `phase/testing` and covers failure, fail-stop, deadline, and cleanup behavior that requires lifecycle acceptance beyond package tests. Local QA evidence is preserved, but machine preflight, exact-head CI, maintainer review, remote multi-node/recovery validation, and formal QA remain pending. ## Remaining validation - Exact-head CI and maintainer review are pending. - Remote multi-node/recovery validation and formal QA are not run in this local test-only patch. - Machine preflight/Python 3.8 execution for the follow-up evidence is pending; environment failures remain separate from product-test failures. - Serializer `WriteTo` failure injection remains intentionally out of scope because no reachable production failure seam exists without a fake serializer. --------- Co-authored-by: XuPeng-SH <[email protected]>
What type of PR is this?
Which issue(s) this PR fixes:
issue #28013
What this PR does / why we need it:
Adds deterministic WAL driver acceptance coverage for the failure-ordering and lifecycle gaps identified after merged PR #28014.
LogEntryWriter.Finishand the production wait path; both waiters must receive the same sentinel before fail-stop release,Appendmust not run, and the committed watermark must not advance.NotifyError; the new barrier assertion fails before the normal implementation is restored.Validation bound to the current PR head
705046072e9e15e00ff60233611d73bf8903bcc6(basemain@b349fea56f1c16e3c947ac730cc114fca3c3f241):Test file SHA256:
981c947cfe70564241f2a27f1bf03e204b72eec76c8670aab6d012ae64b2ba86.Focused and owning CGo normal/race tests for the four lifecycle/failure cases: PASS; the pre-callback ordering race stress also passes 100 iterations. The committed change preserves the exact tested file content; logs and the final delta are indexed in
/Users/violet/Documents/Codex/2026-09-11/matrixone-qa-followup/outputs/wal/REPORT.mdandfinal-state.txt.git diff --check: PASS before commit; the final commit contains onlypkg/vm/engine/tae/logstore/driver/logservicedriver/driver_test.go(90 insertions, 20 deletions relative to the published head).Base behavior: PASS — the merged fix(tae): complete WAL waiters before append fail-stop #28014 production implementation remains unchanged; the test gap was the missing pre-callback and lifecycle assertions.
Negative controls: PASS — removing
committer.NotifyErrorfails the new waiter-order assertion; the production file was restored and is absent from the final diff.BVT: N/A — the covered WAL driver failure ordering is package-internal and has no meaningful stable SQL/BVT entry point. The regression asserts waiter terminal errors, fail-stop ordering, append count, watermark, pending-wait drain, bounded close, and repeated
WaitDonestability.QA required: yes — issue #28013 is marked
phase/testingand covers failure, fail-stop, deadline, and cleanup behavior that requires lifecycle acceptance beyond package tests. Local QA evidence is preserved, but machine preflight, exact-head CI, maintainer review, remote multi-node/recovery validation, and formal QA remain pending.Remaining validation
WriteTofailure injection remains intentionally out of scope because no reachable production failure seam exists without a fake serializer.