Repository navigation
test: stabilize TestCheckpoint1 - #27376
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.
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.
Merge Queue Status
This pull request spent 5 hours 53 minutes 32 seconds in the queue, including 47 minutes 14 seconds running CI. Required conditions to merge
|
`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
`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
`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
## 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.
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #27327
What this PR does / why we need it:
TestCheckpoint1checks 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:
TestCheckpoint1, keeping the scheduler/checkpoint state under test observable;Validation on
mo/mainatc6b2ac9c1e:TestCheckpoint1 -count=100: PASSTestCheckpoint1 -race -count=21: PASSTest_RWDB4failure after the target test passed.