Skip to content

test(tae): scope TestSnapshotGC checkpoint wait - #26099

Merged
XuPeng-SH merged 5 commits into
mainfrom
fix/issue-26098-snapshot-gc-force-checkpoint
Jul 24, 2026
Merged

XuPeng-SH merged 5 commits into
mainfrom
fix/issue-26098-snapshot-gc-force-checkpoint

Conversation

@LeftHandCold

Copy link
Copy Markdown
Collaborator

What type of PR is this?

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

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:

  • 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

@LeftHandCold
LeftHandCold requested a review from XuPeng-SH as a code owner July 23, 2026 10:20
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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=10
  • TestSnapshotGC -race -count=3
  • Snapshot/append/merge/PITR/ISCP GC regression set -count=3
  • go build ./pkg/vm/engine/tae/db
  • go vet ./pkg/vm/engine/tae/db
  • current GitHub UT, SCA, Coverage, BVT, CodeQL, and PR-valid checks are green.

@mergify mergify Bot added the queued label Jul 23, 2026
@mergify

mergify Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-07-23 11:33 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • ❌ Checks failed · in-place
  • 🚫 Left the queue — 2026-07-23 12:06 UTC · at 6a9297036d9da54246519f802e985e864b788ab5

This pull request spent 33 minutes 31 seconds in the queue, with no time running CI.

Waiting for
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
    • check-skipped = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
    • check-success = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-skipped = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-success = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
    • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
    • check-success = Matrixone CI / UT Test on Ubuntu/x86
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Matrixone Utils CI / Coverage
    • check-skipped = Matrixone Utils CI / Coverage
    • check-success = Matrixone Utils CI / Coverage
All conditions
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
    • check-skipped = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
    • check-success = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-skipped = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-success = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
    • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
    • check-success = Matrixone CI / UT Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Matrixone Utils CI / Coverage
    • check-skipped = Matrixone Utils CI / Coverage
    • check-success = Matrixone Utils CI / Coverage
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • github-review-approved [🛡 GitHub branch protection] (documentation)
  • github-review-decision = APPROVED [🛡 GitHub branch protection] (documentation)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / SCA Test on Linux/arm64
    • check-neutral = Matrixone CI / SCA Test on Linux/arm64
    • check-skipped = Matrixone CI / SCA Test on Linux/arm64

Reason

The merge conditions cannot be satisfied due to failing checks

Failing checks:

Hint

You may have to fix your CI before adding the pull request to the queue again.
If you update this pull request, to fix the CI, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Requeued — the merge queue status continues in this comment ↓.

@mergify

mergify Bot commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-07-24 09:04 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • 🚫 Left the queue — 2026-07-24 11:10 UTC · at 01bc0e66dcd53ba0de4dac0ae5a610a003159cf3

This pull request spent 2 hours 6 minutes 40 seconds in the queue, with no time running CI.

Reason

Pull request #26099 has been merged manually at 628313f

Hint

You were too fast!

Tick the box to put this pull request back in the merge queue (same as @mergifyio queue).

  • Requeue this pull request

@XuPeng-SH
XuPeng-SH merged commit 628313f into main Jul 24, 2026
20 of 24 checks passed
@XuPeng-SH
XuPeng-SH deleted the fix/issue-26098-snapshot-gc-force-checkpoint branch July 24, 2026 11:10
@mergify mergify Bot removed the queued label Jul 24, 2026
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## 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]>
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## 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]>
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## 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]>

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/test-ci size/XS Denotes a PR that changes [1, 9] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(tae): TestSnapshotGC waits for global checkpoint quiescence

3 participants