Skip to content

test: stabilize TestCheckpoint1 - #27376

Merged
mergify[bot] merged 3 commits into
matrixorigin:mainfrom
ck89119:issue-27327-main
Aug 20, 2026
Merged

mergify[bot] merged 3 commits into
matrixorigin:mainfrom
ck89119:issue-27327-main

Conversation

@ck89119

@ck89119 ck89119 commented Aug 20, 2026

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:

Fixes #27327

What this PR does / why we need it:

TestCheckpoint1 checks the transient two-block state produced while the background flush/checkpoint scheduler is running. The quick checkpoint test options also configure catalog GC with a 1 ms interval, so catalog GC can reclaim the old object before the polling loop observes that state. In addition, the previous one-second polling timeout is too short under load.

This change:

  • disables catalog GC only for TestCheckpoint1, keeping the scheduler/checkpoint state under test observable;
  • uses the existing bounded default checkpoint wait timeout instead of a fixed one-second timeout.

Validation on mo/main at c6b2ac9c1e:

  • TestCheckpoint1 -count=100: PASS
  • TestCheckpoint1 -race -count=21: PASS
  • The full owning package run reached an unrelated existing Test_RWDB4 failure after the target test passed.
  • Full-package race runs exceeded both 45-minute and 90-minute limits and showed unrelated ants worker nil-pointer panics; no target-related race was observed.

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

Reviewed exact head b2ca5bc07ace5eca8baedb0d93fd3fd77a6f0523. Disabling catalog-entry GC is scoped to this test and does not disable the checkpoint/flush scheduler being exercised; the test still requires the two-block state rather than weakening the assertion. Reusing the repository checkpoint wait bound only extends the failure budget and still returns immediately on success. Verification: full diff/option-order audit and TestCheckpoint1 under -race -count=10, including clean teardown. No blocking issue found.

@mergify mergify Bot added the queued label Aug 20, 2026
@mergify

mergify Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-08-20 11:06 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • ✅ Checks passed · in-place
  • ✅ Merged — 2026-08-20 16:59 UTC · at e7c83d8170de4a458d44a406ad5be42f68a838c3 · squash

This pull request spent 5 hours 53 minutes 32 seconds in the queue, including 47 minutes 14 seconds running CI.

Required conditions to merge
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • github-review-approved [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / UT Test on Ubuntu/x86
    • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
    • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
  • 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
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Utils CI / Coverage
    • check-neutral = Matrixone Utils CI / Coverage
    • check-skipped = Matrixone Utils CI / Coverage
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
    • check-neutral = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
    • check-skipped = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
    • check-neutral = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
    • check-skipped = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)

@mergify
mergify Bot merged commit 7035d8b into matrixorigin:main Aug 20, 2026
25 of 26 checks passed
@mergify mergify Bot removed the queued label Aug 20, 2026
@ck89119
ck89119 deleted the issue-27327-main branch August 21, 2026 03:22
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
`TestCheckpoint1` checks the transient two-block state produced while the background flush/checkpoint scheduler is running. The quick checkpoint test options also configure catalog GC with a 1 ms interval, so catalog GC can reclaim the old object before the polling loop observes that state. In addition, the previous one-second polling timeout is too short under load.

This change:

- disables catalog GC only for `TestCheckpoint1`, keeping the scheduler/checkpoint state under test observable;
- uses the existing bounded default checkpoint wait timeout instead of a fixed one-second timeout.

Validation on `mo/main` at `c6b2ac9c1e`:

- `TestCheckpoint1 -count=100`: PASS
- `TestCheckpoint1 -race -count=21`: PASS
- The full owning package run reached an unrelated existing `Test_RWDB4` failure after the target test passed.
- Full-package race runs exceeded both 45-minute and 90-minute limits and showed unrelated ants worker nil-pointer panics; no target-related race was observed.

Approved by: @XuPeng-SH
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
`TestCheckpoint1` checks the transient two-block state produced while the background flush/checkpoint scheduler is running. The quick checkpoint test options also configure catalog GC with a 1 ms interval, so catalog GC can reclaim the old object before the polling loop observes that state. In addition, the previous one-second polling timeout is too short under load.

This change:

- disables catalog GC only for `TestCheckpoint1`, keeping the scheduler/checkpoint state under test observable;
- uses the existing bounded default checkpoint wait timeout instead of a fixed one-second timeout.

Validation on `mo/main` at `c6b2ac9c1e`:

- `TestCheckpoint1 -count=100`: PASS
- `TestCheckpoint1 -race -count=21`: PASS
- The full owning package run reached an unrelated existing `Test_RWDB4` failure after the target test passed.
- Full-package race runs exceeded both 45-minute and 90-minute limits and showed unrelated ants worker nil-pointer panics; no target-related race was observed.

Approved by: @XuPeng-SH
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
`TestCheckpoint1` checks the transient two-block state produced while the background flush/checkpoint scheduler is running. The quick checkpoint test options also configure catalog GC with a 1 ms interval, so catalog GC can reclaim the old object before the polling loop observes that state. In addition, the previous one-second polling timeout is too short under load.

This change:

- disables catalog GC only for `TestCheckpoint1`, keeping the scheduler/checkpoint state under test observable;
- uses the existing bounded default checkpoint wait timeout instead of a fixed one-second timeout.

Validation on `mo/main` at `c6b2ac9c1e`:

- `TestCheckpoint1 -count=100`: PASS
- `TestCheckpoint1 -race -count=21`: PASS
- The full owning package run reached an unrelated existing `Test_RWDB4` failure after the target test passed.
- Full-package race runs exceeded both 45-minute and 90-minute limits and showed unrelated ants worker nil-pointer panics; no target-related race was observed.

Approved by: @XuPeng-SH
XuPeng-SH added a commit that referenced this pull request Nov 17, 2026
## What type of PR is this?

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

## Which issue(s) this PR fixes:

Related to #32810 (the checkpoint observation failure only).
Related to #27327.

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

`TestCheckpoint1` waits one second for asynchronous flushing and then
resamples the catalog. In [the 4.2-dev CI
failure](https://github.com/matrixorigin/matrixone/actions/runs/43830498308/job/133174778315),
the flush completed after the assertion. The fixture also enables
catalog GC every millisecond, so it can reclaim the old object while the
test is observing the two-block state.

Disable catalog GC only in this test, use the existing bounded
checkpoint wait, and assert the exact last sample that ended the wait.
This backports the fixture isolation and wait used by #27376, while
removing the redundant second scan. Automatic flushing/checkpointing and
the exact two-block assertion remain in place. The existing wait helper
polls every 300 ms at this bound; single focused race runs took 0.32 s
after the change and 0.07 s before it locally; these are not benchmark
results. No production path changes.

Validation on Linux/amd64, Go 1.26.4:

- Exact `TestCheckpoint1` race test passed once and in 93 bounded
repetitions.
- A controlled diagnostic overlay, with the same 2 s background scan and
fixture-local GC setting on both versions, reproduced the old 1 s
failure and passed after the change when the real flush completed.
- Normal `TestCheckpoint1`, `TestCheckpoint2`, and GC-enabled
`TestGCCatalog2` passed.
- Changed-package `gofmt`, `go vet`, `molint`, and configured
`golangci-lint` passed.
- Full normal owning package passed with 261 test/subtest passes and 13
existing skips, using a private disk-backed /tmp (Go 1.26.4, -short
-tags matrixone_test).

This addresses the checkpoint observation failure in #32810, not its
separate control-plane and connection failures.

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.

[Bug]: TestCheckpoint1 intermittently observes one block instead of two

3 participants