Conversation
Aionw
marked this pull request as ready for review
September 18, 2026 03:24
Aionw
requested review from
XucSh,
YiXR,
stmatengss and
ykwd
as code owners
September 18, 2026 03:24
12 tasks
15 tasks
This was referenced Sep 19, 2026
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.
Description
Fix the flaky
FilereadWorkerPoolTest.AcceptsTypedTrailingWhitespaceAndCachesintroduced in #4166 and observed in the unrelated #4161 CI run:https://github.com/kvcache-ai/Mooncake/actions/runs/35190325962/job/105191941422?pr=4161
The test counts every thread under
/proc/self/taskand requires the process-wide count to return to its original baseline after pool destruction. CI enablesUSE_ETCDandSTORE_USE_ETCD, loading a Go shared library whose runtime can create unrelated background threads asynchronously. Joining all pool workers does not restore that process-wide baseline.Add a narrow friend test peer to inspect the pool's own worker vector. Preserve both assertions:
"2 "creates two workers, and changing the environment to"3"still creates two workers because the configuration is cached. Keep both construction/destruction scopes; remove process-wide thread polling and the now-unnecessary Linux-only guard. No production behavior or public API change.Searched existing issues/PRs for the test name,
fileread_worker_pool, andWaitForProcessThreadCount; no dedicated fix found. #4179 reorganizes store paths but does not address this assertion race.Module
mooncake-store)Type of Change
How Has This Been Tested?
Test commands:
Test results:
Before the fix, the local CPU build (etcd disabled) passed 100/100 separate executions. Loading an existing
libetcd_wrapper.sowithLD_PRELOADreproduced 13 failures in 100 separate executions: nine at line 76 (the exact CI assertion), four at line 70 (the equivalent first-pool assertion). After the fix, both plain and Go-runtime-preloaded CTest repetitions passed 1000/1000. This is a controlled reproduction, not a full recreation of the CI build; CUDA and etcd build options remain disabled locally. Existing build configuration uses ccache launchers and disables sccache.All applicable touched-file hooks passed with
prek(pre-commit unavailable) and clang-format 20.1.8. The initial formatting attempt with the host's clang-format 22 was rejected by the version-pinned script; rerunning with 20 passed.Checklist
./scripts/code_format.sh.prekequivalent).AI Assistance Disclosure
An OpenAI coding assistant investigated CI logs, reproduced the failure, implemented this focused fix, and ran the checks. This PR is intentionally a draft pending the human submitter's line-by-line review and confirmation that they understand and can defend the change end to end.