test(fileservice): remove async callback flush deadline - #27789
Open
gouhongshen wants to merge 1 commit into
Open
test(fileservice): remove async callback flush deadline#27789gouhongshen wants to merge 1 commit into
gouhongshen wants to merge 1 commit into
Conversation
1 task
gouhongshen
force-pushed
the
agent/issue-27764-ea8888ba
branch
from
August 28, 2026 08:08
a3e9478 to
c980a81
Compare
gouhongshen
marked this pull request as ready for review
August 28, 2026 08:08
gouhongshen
requested review from
LeftHandCold,
XuPeng-SH and
fengttt
as code owners
August 28, 2026 08:08
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? |
gouhongshen
force-pushed
the
agent/issue-27764-ea8888ba
branch
from
August 28, 2026 09:43
c980a81 to
71349d9
Compare
gouhongshen
force-pushed
the
agent/issue-27764-ea8888ba
branch
from
August 28, 2026 13:55
a273329 to
24b2743
Compare
gouhongshen
force-pushed
the
agent/issue-27764-ea8888ba
branch
from
August 28, 2026 14:04
24b2743 to
c6220a5
Compare
gouhongshen
force-pushed
the
agent/issue-27764-ea8888ba
branch
from
August 28, 2026 14:17
c6220a5 to
7710562
Compare
Contributor
Author
|
@Mergifyio queue |
Contributor
Merge Queue Status
Waiting for any of
All conditions
|
gouhongshen
force-pushed
the
agent/issue-27764-ea8888ba
branch
from
August 28, 2026 14:32
7710562 to
3361465
Compare
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:
Related to #27764
What this PR does / why we need it:
Root cause
TestDiskCacheAsyncCallbacksRemainOrderedAndBoundedsubmitted all 64 async updates, intentionally blocked the ordered callback chain, then gaveDiskCache.Flusha five-second context.Flushis correctly defined to wait only for the write worker to drainasync.mu.pending; callbacks run after that barrier and retain their admission slots and copied bytes until they return. Under a loaded race worker, the context could expire before the writes drained, so elapsed scheduling time—not the lifecycle contract—decided the test result.Changes
Flushwithcontext.Background()after the callback-start phase, so completion is the write-drained synchronization point rather than a five-second performance deadline.async.mu.pendingis empty while all 64 callback-owned slots and bytes remain retained, then retain the existing overflow-drop and ordered callback assertions.Issue-to-test proof
TestDiskCacheAsyncCallbacksRemainOrderedAndBoundednow deterministically covers the exact issue scenario: 64 distinct asynchronous writes (the slot capacity), a blocked first callback, a completed write drain, full callback-owned admission accounting, rejection of a 65th update, and ordered release after callbacks unblock. BVT is not applicable because this is a package-private DiskCache worker/callback synchronization contract with no SQL or client-visible semantic change.Tests run
.agents/skills/mo-dev/scripts/mo-cgo-test -list "^TestDiskCacheAsyncCallbacksRemainOrderedAndBounded$" ./pkg/fileservice.agents/skills/mo-dev/scripts/mo-cgo-test -json -count=1 -timeout=120s -run "^TestDiskCacheAsyncCallbacksRemainOrderedAndBounded$" ./pkg/fileservice.agents/skills/mo-dev/scripts/mo-cgo-test -race -count=100 -timeout=120s -run "^TestDiskCacheAsyncCallbacksRemainOrderedAndBounded$" ./pkg/fileservicegit diff --check origin/main...HEADAll listed focused checks passed.
A full normal
pkg/fileservicerun was attempted but failed only atTestMinioSDKwithAccess Deniedfromlocalhost:9007; the same command at cleanorigin/mainfailed with the same test and signature.Residual risks
This is test-only. A broken Flush barrier would now be caught by the Go test process timeout rather than by a five-second context cancellation; the test no longer treats ordinary scheduler delay as a failure. The existing callback-start guard and all admission/order assertions remain unchanged.