Skip to content

test(tae): wait for checkpoint completion consistently - #25953

Merged
XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
jiangxinmeng1:issue-25931-checkpoint-wait
Jul 22, 2026
Merged

XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
jiangxinmeng1:issue-25931-checkpoint-wait

Conversation

@jiangxinmeng1

Copy link
Copy Markdown
Contributor

What type of PR is this?

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

Which issue(s) this PR fixes:

issue #25931

What this PR does / why we need it:

wait for checkpoint completion consistently

@jiangxinmeng1
jiangxinmeng1 requested a review from XuPeng-SH as a code owner July 21, 2026 08: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 →

@gouhongshen gouhongshen 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.

Codex automated review

The shared waiter does not establish a completion boundary beyond the pre-existing instantaneous predicate, so the linked intermittent pending-LSN failure remains possible. Existing PR reviews, issue comments, and inline threads are empty; CI is green, but local focused testing could not run because go is unavailable.

P1 - Wait for the forced checkpoint's completion boundary, not the same racy snapshot (pkg/vm/engine/tae/db/testutil/funcs.go:307)

This polls the unchanged AllCheckpointsFinished predicate, then re-reads it once in require.True. That predicate reads the WAL pending count and current incremental intent independently; it has no generation/token tied to the preceding ForceCheckpoint/ForceGlobalCheckpoint call. #25931 records the concrete failure: this predicate returned, then the immediately following pending-LSN assertion observed 1. The new helper can follow the identical interleaving (or fail its new recheck) rather than wait for the scheduler work to settle. Use a completion signal scoped to the forced checkpoint, or otherwise synchronize the scheduler/WAL state before returning; merely centralizing and reasserting the old snapshot does not fix the flake.

@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.

Reviewed latest head 1b3432b. No blocking findings.

The shared waiter now waits for the WAL checkpointed LSN to reach the captured target/current watermark and turns a silent polling timeout into an explicit assertion failure. The forced ICKP/GCKP completion path and updated callers are consistent.

Local verification:

  • TestGlobalCheckpoint2: 20/20 passed
  • TestGlobalCheckpoint2 under -race: 3/3 passed
  • TestAppend2, TestTruncate1, TestReplay5: 5/5 each passed
  • Test_gcArg: 5/5 passed
  • go vet passed for the changed/consumer packages

@gouhongshen gouhongshen 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.

Codex automated review

No findings. The current head captures a post-force WAL target and waits for it to be checkpointed, addressing the obsolete blocking review. Existing PR reviews/comments/inline comments were inspected; Ubuntu CI passed the affected test package. Local CGo tests could not start because libmo.dylib is absent.

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

mergify Bot commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-07-22 04:49 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • 🟠 Checks running · in-place
  • 🚫 Left the queue — 2026-07-22 05:10 UTC · at 7c4e7d5d5cc9d3a132b2cfabd652be90cd6bcb6c

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

Reason

The pull request can't be updated

This pull request seems to come from a fork, and Mergify needs the author's permission to update its branch.
The author needs to enable "Allow edits from maintainers" on this pull request, or update the branch manually.

Hint

You should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

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 8f5f0c8 into matrixorigin:main Jul 22, 2026
22 of 24 checks passed
@mergify mergify Bot added dequeued and removed queued labels Jul 22, 2026
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
…25953)

## What type of PR is this?

- [ ] API-change
- [x] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

issue matrixorigin#25931

## What this PR does / why we need it:

wait for checkpoint completion consistently

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
…25953)

## What type of PR is this?

- [ ] API-change
- [x] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

issue matrixorigin#25931

## What this PR does / why we need it:

wait for checkpoint completion consistently

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
…25953)

## What type of PR is this?

- [ ] API-change
- [x] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

issue matrixorigin#25931

## What this PR does / why we need it:

wait for checkpoint completion consistently

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

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/bug Something isn't working size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants