Repository navigation
Description
Is there an existing issue for the same bug?
- I have checked the existing issues.
Branch Name
main / PR #26096 branch fix/issue-25996-prepared-set
Commit ID
Other Environment Information
- Hardware parameters: 8-core / 16 GiB GitHub runner
- OS type: Ubuntu / x86
- Others: Matrixone CI unit-test jobActual Behavior
TestCkpLeak failed after its 10-second checkpoint wait in run 30251258817/job 89929582475:
target LSN: 201, checkpointed LSN: 1, current LSN: 203, pending LSN count: 202
The first incremental checkpoint completed at LSN 1. A second incremental intent was created with flushChecked=false, but no later ICKP executed before timeout. Normal table-tail flush tasks completed while that intent remained below the two-minute stalled-checkpoint recovery threshold.
This is independent of PR #26096: its diff changes only frontend, planner, and prepared-statement tests, with no TAE/checkpoint/WAL/catalog/logtail changes.
Expected Behavior
TestCkpLeak should wait for a checkpoint covering the concurrent append workload it created, without requiring global background WAL/checkpoint quiescence.
Steps to Reproduce
.agents/skills/mo-dev/scripts/mo-cgo-test -count=20 -run TestCkpLeak -timeout=180s ./pkg/vm/engine/tae/db/testThe same checkpoint code passed 20/20 locally, confirming a timing-dependent failure. The linked CI log captures the failing interleaving.
Additional information
Root cause: #25953 replaced the old best-effort wait/early return in TestCkpLeak with WaitAllCheckpointsFinished. After a concurrent WAL burst this helper waits for global background quiescence, although the test only needs a checkpoint covering its own writes. A pending background ICKP can still be waiting for asynchronous table-tail flush work, while the production stalled-intent recovery path intentionally activates only after two minutes; the test asserts after ten seconds.
This is the same synchronization-pattern class fixed for other TAE tests by #26033 and #26099. Older TestCkpLeak issues #21171 and #21722 covered different assertions.
Proposed test-only fix: after append workers finish, call ForceCheckpoint through db.TxnMgr.Now() under a ten-second context. This waits on the checkpoint intent covering the test fence and does not change production behavior.
Acceptance criteria:
TestCkpLeakuses a workload-scoped checkpoint fence.- Repeated normal and race-enabled runs pass.
- Representative TAE checkpoint/GC tests and package build/vet remain green.
Activity
LeftHandCold commentedon Jul 27, 2026
Fix opened in #26244.
The CI failure is a test synchronization bug, not a checkpoint leak or a regression from #26096:
WaitAllCheckpointsFinishedchases global checkpoint quiescence, while the second incremental checkpoint intent can remain pending beyond the test 10-second deadline after the workload has already completed. The PR fences the completed workload atTxnMgr.Now()and waits through boundedForceCheckpointfor that fixed timestamp.Validated with 20 focused runs, 3 race runs, 3 related-test runs,
go vet, and TAE DB build.test(tae): scope TestCkpLeak checkpoint wait (#26244)
test(tae): scope TestCkpLeak checkpoint wait (matrixorigin#26244)
test(tae): scope TestCkpLeak checkpoint wait (matrixorigin#26244)
test(tae): scope TestCkpLeak checkpoint wait (matrixorigin#26244)