Repository navigation
test(tae): scope TestSnapshotGC checkpoint wait - #26099
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? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Approved — deep-reviewed exact head 5edd778fb1f297e8f66574bbc09dfe59768a84b3.
The synchronization scope is correct: both workload wait groups complete before TxnMgr.Now() captures the target; ForceCheckpoint flushes through that target and ForceICKP inherits the caller's 10-second deadline. This waits for the checkpoint covering this test's committed work without requiring unrelated global WAL/checkpoint quiescence. The timeout context is canceled on return, and any scheduled checkpoint remains runner-owned and is terminated by the existing test-engine close path.
Q1–Q3 audit found no leak, unbounded wait, or accumulation introduced by the change. Validation passed:
TestSnapshotGC -count=10TestSnapshotGC -race -count=3- Snapshot/append/merge/PITR/ISCP GC regression set
-count=3 go build ./pkg/vm/engine/tae/dbgo vet ./pkg/vm/engine/tae/db- current GitHub UT, SCA, Coverage, BVT, CodeQL, and PR-valid checks are green.
Merge Queue Status
This pull request spent 33 minutes 31 seconds in the queue, with no time running CI. Waiting for
All conditions
ReasonThe merge conditions cannot be satisfied due to failing checks Failing checks:
HintYou may have to fix your CI before adding the pull request to the queue again. Requeued — the merge queue status continues in this comment ↓. |
Merge Queue Status
This pull request spent 2 hours 6 minutes 40 seconds in the queue, with no time running CI. ReasonPull request #26099 has been merged manually at 628313f HintYou were too fast! 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: Fixes matrixorigin#26098 ## What this PR does / why we need it: TestSnapshotGC waited for global checkpoint quiescence after a concurrent WAL burst. That is broader than the test contract and flakes when unrelated checkpoint work remains pending. After the test workers finish, force an incremental checkpoint through db.TxnMgr.Now() under a ten-second context. The test now waits for the checkpoint that covers its own workload; its existing GC and snapshot assertions remain unchanged. This is test-only and does not change MatrixOne runtime behavior. Validation: - TestSnapshotGC: 10 iterations - TestSnapshotGC with race: 3 iterations - TestSnapshotGC, TestAppendAndGC, TestAppendAndGC2, TestMergeGC, TestPitrMeta, and TestIscpMeta: 3 iterations - go build ./pkg/vm/engine/tae/db - go vet ./pkg/vm/engine/tae/db - git diff --check Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> 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: Fixes matrixorigin#26098 ## What this PR does / why we need it: TestSnapshotGC waited for global checkpoint quiescence after a concurrent WAL burst. That is broader than the test contract and flakes when unrelated checkpoint work remains pending. After the test workers finish, force an incremental checkpoint through db.TxnMgr.Now() under a ten-second context. The test now waits for the checkpoint that covers its own workload; its existing GC and snapshot assertions remain unchanged. This is test-only and does not change MatrixOne runtime behavior. Validation: - TestSnapshotGC: 10 iterations - TestSnapshotGC with race: 3 iterations - TestSnapshotGC, TestAppendAndGC, TestAppendAndGC2, TestMergeGC, TestPitrMeta, and TestIscpMeta: 3 iterations - go build ./pkg/vm/engine/tae/db - go vet ./pkg/vm/engine/tae/db - git diff --check Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> 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: Fixes matrixorigin#26098 ## What this PR does / why we need it: TestSnapshotGC waited for global checkpoint quiescence after a concurrent WAL burst. That is broader than the test contract and flakes when unrelated checkpoint work remains pending. After the test workers finish, force an incremental checkpoint through db.TxnMgr.Now() under a ten-second context. The test now waits for the checkpoint that covers its own workload; its existing GC and snapshot assertions remain unchanged. This is test-only and does not change MatrixOne runtime behavior. Validation: - TestSnapshotGC: 10 iterations - TestSnapshotGC with race: 3 iterations - TestSnapshotGC, TestAppendAndGC, TestAppendAndGC2, TestMergeGC, TestPitrMeta, and TestIscpMeta: 3 iterations - go build ./pkg/vm/engine/tae/db - go vet ./pkg/vm/engine/tae/db - git diff --check Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: XuPeng-SH <[email protected]>
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #26098
What this PR does / why we need it:
TestSnapshotGC waited for global checkpoint quiescence after a concurrent WAL burst. That is broader than the test contract and flakes when unrelated checkpoint work remains pending.
After the test workers finish, force an incremental checkpoint through db.TxnMgr.Now() under a ten-second context. The test now waits for the checkpoint that covers its own workload; its existing GC and snapshot assertions remain unchanged. This is test-only and does not change MatrixOne runtime behavior.
Validation: