Repository navigation
test(gc): make deleter concurrency check deterministic - #26644
Merged
XuPeng-SH merged 4 commits intoAug 3, 2026
Merged
Conversation
Contributor
Author
|
The branch is now rebased onto The remaining unresolved failures from workflow run 30807956392 are unrelated to this PR, whose diff only changes
Run 30807956392 reached attempt 2 and will not be rerun again. |
1 task done
1 task done
gouhongshen
force-pushed
the
agent/issue-26643-1a93ca15
branch
from
August 3, 2026 15:14
1e72b8f to
29bc248
Compare
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…26644) ## 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: issue matrixorigin#26643 ## What this PR does / why we need it: ### Root cause `TestDeleterConcurrentDelete` simulated S3 latency with a 10 ms sleep in every `Delete` call, then required the complete four-batch operation to finish in less than 35 ms. That wall-clock threshold measured runner scheduling delay as well as concurrency. In the reported CI failure, all four calls overlapped and finished within about 1 ms of each other, all 20 files were deleted exactly once, but a runner pause extended every call to about 40-41 ms and the test failed at 42.3 ms. ### Changes - Add an optional, context-aware barrier to the existing file-service mock. - Make the concurrent deletion test hold every batch at the barrier until all four `Delete` calls have entered it. A serial or under-concurrent implementation therefore cannot pass. - Retain exact assertions for four batches, 20 deleted files, and one deletion per file. The 10-second context is only a hang guard for a real concurrency regression; successful execution has no timing assertion. Production code is unchanged. ### Issue-to-test proof `TestDeleterConcurrentDelete` directly proves matrixorigin#26643: four batch calls must be simultaneously in flight before any call can complete. As a negative control, temporarily setting the test to one worker produced the expected context deadline at the barrier; restoring four workers passed 100 repetitions. BVT is not applicable because this is an internal goroutine scheduling contract with no SQL-visible behavior. ### Validation After rebasing onto `main` at `acfb8ef77ccbb41637dbe719c7b544d2ecf012f6` (including the merged fix for the previous unrelated blocker matrixorigin#26649), the PR diff remains limited to `pkg/vm/engine/tae/db/gc/v3/deleter_test.go` and the following checks passed: - `GOWORK=off go list -mod=readonly ./pkg/vm/engine/tae/db/gc/v3` - `GOWORK=off go build -mod=readonly ./pkg/vm/engine/tae/db/gc/v3` with the repository CGo include/library paths - `GOWORK=off go vet -mod=readonly ./pkg/vm/engine/tae/db/gc/v3` with the repository CGo include/library paths - `.agents/skills/mo-dev/scripts/mo-cgo-test -run '^TestDeleterConcurrentDelete$' -count=100 -timeout=180s ./pkg/vm/engine/tae/db/gc/v3` - `.agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=180s ./pkg/vm/engine/tae/db/gc/v3` - Focused race measurement: `T=0s`, `B=30s`, adaptive `N=100` - `.agents/skills/mo-dev/scripts/mo-cgo-test -race -run '^TestDeleterConcurrentDelete$' -count=100 -timeout=30s ./pkg/vm/engine/tae/db/gc/v3` - `.agents/skills/mo-dev/scripts/mo-cgo-test -race -count=1 -timeout=30s ./pkg/vm/engine/tae/db/gc/v3` - `MORPC_GC_IDLE_INTERVAL=1ms .agents/skills/mo-dev/scripts/mo-cgo-test -race -run '^TestIndependentControlBackendPreservesSlowDataRequest$' -count=100 -timeout=180s ./pkg/common/morpc` - GitHub Actions runs `30826562985` and `30826561149`: all completed checks successful, skipped, or neutral - `git merge-tree --write-tree HEAD origin/main` against `fa6c57cbfaba17d705ebc673bd49c06bf156e4d5`: no conflict - `git diff --check` ### Residual risk There is no production compatibility or performance impact. If deletion concurrency regresses, this test now fails after the 10-second hang guard rather than producing a false performance failure under runner load. 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
…26644) ## 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: issue matrixorigin#26643 ## What this PR does / why we need it: ### Root cause `TestDeleterConcurrentDelete` simulated S3 latency with a 10 ms sleep in every `Delete` call, then required the complete four-batch operation to finish in less than 35 ms. That wall-clock threshold measured runner scheduling delay as well as concurrency. In the reported CI failure, all four calls overlapped and finished within about 1 ms of each other, all 20 files were deleted exactly once, but a runner pause extended every call to about 40-41 ms and the test failed at 42.3 ms. ### Changes - Add an optional, context-aware barrier to the existing file-service mock. - Make the concurrent deletion test hold every batch at the barrier until all four `Delete` calls have entered it. A serial or under-concurrent implementation therefore cannot pass. - Retain exact assertions for four batches, 20 deleted files, and one deletion per file. The 10-second context is only a hang guard for a real concurrency regression; successful execution has no timing assertion. Production code is unchanged. ### Issue-to-test proof `TestDeleterConcurrentDelete` directly proves matrixorigin#26643: four batch calls must be simultaneously in flight before any call can complete. As a negative control, temporarily setting the test to one worker produced the expected context deadline at the barrier; restoring four workers passed 100 repetitions. BVT is not applicable because this is an internal goroutine scheduling contract with no SQL-visible behavior. ### Validation After rebasing onto `main` at `acfb8ef77ccbb41637dbe719c7b544d2ecf012f6` (including the merged fix for the previous unrelated blocker matrixorigin#26649), the PR diff remains limited to `pkg/vm/engine/tae/db/gc/v3/deleter_test.go` and the following checks passed: - `GOWORK=off go list -mod=readonly ./pkg/vm/engine/tae/db/gc/v3` - `GOWORK=off go build -mod=readonly ./pkg/vm/engine/tae/db/gc/v3` with the repository CGo include/library paths - `GOWORK=off go vet -mod=readonly ./pkg/vm/engine/tae/db/gc/v3` with the repository CGo include/library paths - `.agents/skills/mo-dev/scripts/mo-cgo-test -run '^TestDeleterConcurrentDelete$' -count=100 -timeout=180s ./pkg/vm/engine/tae/db/gc/v3` - `.agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=180s ./pkg/vm/engine/tae/db/gc/v3` - Focused race measurement: `T=0s`, `B=30s`, adaptive `N=100` - `.agents/skills/mo-dev/scripts/mo-cgo-test -race -run '^TestDeleterConcurrentDelete$' -count=100 -timeout=30s ./pkg/vm/engine/tae/db/gc/v3` - `.agents/skills/mo-dev/scripts/mo-cgo-test -race -count=1 -timeout=30s ./pkg/vm/engine/tae/db/gc/v3` - `MORPC_GC_IDLE_INTERVAL=1ms .agents/skills/mo-dev/scripts/mo-cgo-test -race -run '^TestIndependentControlBackendPreservesSlowDataRequest$' -count=100 -timeout=180s ./pkg/common/morpc` - GitHub Actions runs `30826562985` and `30826561149`: all completed checks successful, skipped, or neutral - `git merge-tree --write-tree HEAD origin/main` against `fa6c57cbfaba17d705ebc673bd49c06bf156e4d5`: no conflict - `git diff --check` ### Residual risk There is no production compatibility or performance impact. If deletion concurrency regresses, this test now fails after the 10-second hang guard rather than producing a false performance failure under runner load. 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
…26644) ## 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: issue matrixorigin#26643 ## What this PR does / why we need it: ### Root cause `TestDeleterConcurrentDelete` simulated S3 latency with a 10 ms sleep in every `Delete` call, then required the complete four-batch operation to finish in less than 35 ms. That wall-clock threshold measured runner scheduling delay as well as concurrency. In the reported CI failure, all four calls overlapped and finished within about 1 ms of each other, all 20 files were deleted exactly once, but a runner pause extended every call to about 40-41 ms and the test failed at 42.3 ms. ### Changes - Add an optional, context-aware barrier to the existing file-service mock. - Make the concurrent deletion test hold every batch at the barrier until all four `Delete` calls have entered it. A serial or under-concurrent implementation therefore cannot pass. - Retain exact assertions for four batches, 20 deleted files, and one deletion per file. The 10-second context is only a hang guard for a real concurrency regression; successful execution has no timing assertion. Production code is unchanged. ### Issue-to-test proof `TestDeleterConcurrentDelete` directly proves matrixorigin#26643: four batch calls must be simultaneously in flight before any call can complete. As a negative control, temporarily setting the test to one worker produced the expected context deadline at the barrier; restoring four workers passed 100 repetitions. BVT is not applicable because this is an internal goroutine scheduling contract with no SQL-visible behavior. ### Validation After rebasing onto `main` at `acfb8ef77ccbb41637dbe719c7b544d2ecf012f6` (including the merged fix for the previous unrelated blocker matrixorigin#26649), the PR diff remains limited to `pkg/vm/engine/tae/db/gc/v3/deleter_test.go` and the following checks passed: - `GOWORK=off go list -mod=readonly ./pkg/vm/engine/tae/db/gc/v3` - `GOWORK=off go build -mod=readonly ./pkg/vm/engine/tae/db/gc/v3` with the repository CGo include/library paths - `GOWORK=off go vet -mod=readonly ./pkg/vm/engine/tae/db/gc/v3` with the repository CGo include/library paths - `.agents/skills/mo-dev/scripts/mo-cgo-test -run '^TestDeleterConcurrentDelete$' -count=100 -timeout=180s ./pkg/vm/engine/tae/db/gc/v3` - `.agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=180s ./pkg/vm/engine/tae/db/gc/v3` - Focused race measurement: `T=0s`, `B=30s`, adaptive `N=100` - `.agents/skills/mo-dev/scripts/mo-cgo-test -race -run '^TestDeleterConcurrentDelete$' -count=100 -timeout=30s ./pkg/vm/engine/tae/db/gc/v3` - `.agents/skills/mo-dev/scripts/mo-cgo-test -race -count=1 -timeout=30s ./pkg/vm/engine/tae/db/gc/v3` - `MORPC_GC_IDLE_INTERVAL=1ms .agents/skills/mo-dev/scripts/mo-cgo-test -race -run '^TestIndependentControlBackendPreservesSlowDataRequest$' -count=100 -timeout=180s ./pkg/common/morpc` - GitHub Actions runs `30826562985` and `30826561149`: all completed checks successful, skipped, or neutral - `git merge-tree --write-tree HEAD origin/main` against `fa6c57cbfaba17d705ebc673bd49c06bf156e4d5`: no conflict - `git diff --check` ### Residual risk There is no production compatibility or performance impact. If deletion concurrency regresses, this test now fails after the 10-second hang guard rather than producing a false performance failure under runner load. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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:
issue #26643
What this PR does / why we need it:
Root cause
TestDeleterConcurrentDeletesimulated S3 latency with a 10 ms sleep in everyDeletecall, then required the complete four-batch operation to finish in lessthan 35 ms. That wall-clock threshold measured runner scheduling delay as well
as concurrency. In the reported CI failure, all four calls overlapped and
finished within about 1 ms of each other, all 20 files were deleted exactly
once, but a runner pause extended every call to about 40-41 ms and the test
failed at 42.3 ms.
Changes
four
Deletecalls have entered it. A serial or under-concurrentimplementation therefore cannot pass.
per file. The 10-second context is only a hang guard for a real concurrency
regression; successful execution has no timing assertion.
Production code is unchanged.
Issue-to-test proof
TestDeleterConcurrentDeletedirectly proves #26643: four batch calls must besimultaneously in flight before any call can complete. As a negative control,
temporarily setting the test to one worker produced the expected context
deadline at the barrier; restoring four workers passed 100 repetitions.
BVT is not applicable because this is an internal goroutine scheduling contract
with no SQL-visible behavior.
Validation
After rebasing onto
mainatacfb8ef77ccbb41637dbe719c7b544d2ecf012f6(including the merged fix for theprevious unrelated blocker #26649), the PR diff remains limited to
pkg/vm/engine/tae/db/gc/v3/deleter_test.goand the following checks passed:GOWORK=off go list -mod=readonly ./pkg/vm/engine/tae/db/gc/v3GOWORK=off go build -mod=readonly ./pkg/vm/engine/tae/db/gc/v3with the repository CGo include/library pathsGOWORK=off go vet -mod=readonly ./pkg/vm/engine/tae/db/gc/v3with the repository CGo include/library paths.agents/skills/mo-dev/scripts/mo-cgo-test -run '^TestDeleterConcurrentDelete$' -count=100 -timeout=180s ./pkg/vm/engine/tae/db/gc/v3.agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=180s ./pkg/vm/engine/tae/db/gc/v3T=0s,B=30s, adaptiveN=100.agents/skills/mo-dev/scripts/mo-cgo-test -race -run '^TestDeleterConcurrentDelete$' -count=100 -timeout=30s ./pkg/vm/engine/tae/db/gc/v3.agents/skills/mo-dev/scripts/mo-cgo-test -race -count=1 -timeout=30s ./pkg/vm/engine/tae/db/gc/v3MORPC_GC_IDLE_INTERVAL=1ms .agents/skills/mo-dev/scripts/mo-cgo-test -race -run '^TestIndependentControlBackendPreservesSlowDataRequest$' -count=100 -timeout=180s ./pkg/common/morpc30826562985and30826561149: all completed checks successful, skipped, or neutralgit merge-tree --write-tree HEAD origin/mainagainstfa6c57cbfaba17d705ebc673bd49c06bf156e4d5: no conflictgit diff --checkResidual risk
There is no production compatibility or performance impact. If deletion
concurrency regresses, this test now fails after the 10-second hang guard rather
than producing a false performance failure under runner load.