Repository navigation
test: stabilize asynchronous cleanup waits - #26256
Merged
Merged
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? |
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
## What type of PR is this? - [x] BUG - [x] Test and CI ## Which issue(s) this PR fixes: Fixes matrixorigin#26254 Fixes matrixorigin#26255 ## What this PR does / why we need it: Two unrelated asynchronous subsystems were made flaky by test-only timing assumptions under the parallel Ubuntu/x86 UT workload. ### Root cause - TAE checkpoint tests wrapped real flush/checkpoint I/O in 5, 10, or 20 second deadlines. A single storage `writer.Sync` can legitimately exceed 20 seconds under parallel CI, so `TestSnapshotGC` could cancel `ForceFlush` before the asynchronous work completed. - The user-level-lock test service latched `blockUnlock=true` when `Unlock` entered. Clearing the flag did not release calls already in flight; all four detached-cleanup workers remained occupied until their one-second contexts expired. A saturated 1,024-entry test queue could therefore miss its three-second recovery assertion. ### Changes - Add a shared one-minute checkpoint/flush timeout for storage-backed TAE tests and apply it to the short checkpoint helpers and nearby direct call sites. - Make the user-level-lock test double observe recovery while an unlock is in flight. - Add a deterministic regression proving an already-blocked mock unlock resumes promptly. Production checkpoint and user-lock behavior is unchanged. ## Validation - `TestUserLevelLockCleanupTestServiceUnblocksInFlightUnlock|TestDetachedUserLevelLockCleanupQueueIsBoundedAndDeduped`: `-race -count=20` - `TestSnapshotGC|TestAppendAndGC2|TestCkpLeak|TestReplay2`: `-count=5` - Same TAE set: `-race -count=1` - Full `pkg/sql/plan/function`, `pkg/vm/engine/tae/db/test`, and `pkg/vm/engine/tae/db/testutil` tests - `go build` for affected production/test-support packages - `go vet` for affected test packages
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
## What type of PR is this? - [x] BUG - [x] Test and CI ## Which issue(s) this PR fixes: Fixes matrixorigin#26254 Fixes matrixorigin#26255 ## What this PR does / why we need it: Two unrelated asynchronous subsystems were made flaky by test-only timing assumptions under the parallel Ubuntu/x86 UT workload. ### Root cause - TAE checkpoint tests wrapped real flush/checkpoint I/O in 5, 10, or 20 second deadlines. A single storage `writer.Sync` can legitimately exceed 20 seconds under parallel CI, so `TestSnapshotGC` could cancel `ForceFlush` before the asynchronous work completed. - The user-level-lock test service latched `blockUnlock=true` when `Unlock` entered. Clearing the flag did not release calls already in flight; all four detached-cleanup workers remained occupied until their one-second contexts expired. A saturated 1,024-entry test queue could therefore miss its three-second recovery assertion. ### Changes - Add a shared one-minute checkpoint/flush timeout for storage-backed TAE tests and apply it to the short checkpoint helpers and nearby direct call sites. - Make the user-level-lock test double observe recovery while an unlock is in flight. - Add a deterministic regression proving an already-blocked mock unlock resumes promptly. Production checkpoint and user-lock behavior is unchanged. ## Validation - `TestUserLevelLockCleanupTestServiceUnblocksInFlightUnlock|TestDetachedUserLevelLockCleanupQueueIsBoundedAndDeduped`: `-race -count=20` - `TestSnapshotGC|TestAppendAndGC2|TestCkpLeak|TestReplay2`: `-count=5` - Same TAE set: `-race -count=1` - Full `pkg/sql/plan/function`, `pkg/vm/engine/tae/db/test`, and `pkg/vm/engine/tae/db/testutil` tests - `go build` for affected production/test-support packages - `go vet` for affected test packages
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
## What type of PR is this? - [x] BUG - [x] Test and CI ## Which issue(s) this PR fixes: Fixes matrixorigin#26254 Fixes matrixorigin#26255 ## What this PR does / why we need it: Two unrelated asynchronous subsystems were made flaky by test-only timing assumptions under the parallel Ubuntu/x86 UT workload. ### Root cause - TAE checkpoint tests wrapped real flush/checkpoint I/O in 5, 10, or 20 second deadlines. A single storage `writer.Sync` can legitimately exceed 20 seconds under parallel CI, so `TestSnapshotGC` could cancel `ForceFlush` before the asynchronous work completed. - The user-level-lock test service latched `blockUnlock=true` when `Unlock` entered. Clearing the flag did not release calls already in flight; all four detached-cleanup workers remained occupied until their one-second contexts expired. A saturated 1,024-entry test queue could therefore miss its three-second recovery assertion. ### Changes - Add a shared one-minute checkpoint/flush timeout for storage-backed TAE tests and apply it to the short checkpoint helpers and nearby direct call sites. - Make the user-level-lock test double observe recovery while an unlock is in flight. - Add a deterministic regression proving an already-blocked mock unlock resumes promptly. Production checkpoint and user-lock behavior is unchanged. ## Validation - `TestUserLevelLockCleanupTestServiceUnblocksInFlightUnlock|TestDetachedUserLevelLockCleanupQueueIsBoundedAndDeduped`: `-race -count=20` - `TestSnapshotGC|TestAppendAndGC2|TestCkpLeak|TestReplay2`: `-count=5` - Same TAE set: `-race -count=1` - Full `pkg/sql/plan/function`, `pkg/vm/engine/tae/db/test`, and `pkg/vm/engine/tae/db/testutil` tests - `go build` for affected production/test-support packages - `go vet` for affected test packages
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #26254
Fixes #26255
Fixes #26253
What this PR does / why we need it:
Two unrelated asynchronous subsystems were made flaky by test-only timing assumptions under the parallel Ubuntu/x86 UT workload.
Root cause
writer.Synccan legitimately exceed 20 seconds under parallel CI, soTestSnapshotGCcould cancelForceFlushbefore the asynchronous work completed.blockUnlock=truewhenUnlockentered. Clearing the flag did not release calls already in flight; all four detached-cleanup workers remained occupied until their one-second contexts expired. A saturated 1,024-entry test queue could therefore miss its three-second recovery assertion.Changes
Production checkpoint and user-lock behavior is unchanged.
Validation
TestUserLevelLockCleanupTestServiceUnblocksInFlightUnlock|TestDetachedUserLevelLockCleanupQueueIsBoundedAndDeduped:-race -count=20TestSnapshotGC|TestAppendAndGC2|TestCkpLeak|TestReplay2:-count=5-race -count=1pkg/sql/plan/function,pkg/vm/engine/tae/db/test, andpkg/vm/engine/tae/db/testutiltestsgo buildfor affected production/test-support packagesgo vetfor affected test packages