Skip to content

[HiCache] Check in-flight async ops in is_fully_idle() before attach/detach#20746

Merged
hnyls2002 merged 3 commits intomainfrom
lsyin/fix-hicache-attach
Mar 18, 2026
Merged

[HiCache] Check in-flight async ops in is_fully_idle() before attach/detach#20746
hnyls2002 merged 3 commits intomainfrom
lsyin/fix-hicache-attach

Conversation

@hnyls2002
Copy link
Copy Markdown
Collaborator

  • Check ongoing_write_through, ongoing_load_back, ongoing_prefetch, ongoing_backup in is_fully_idle() so attach/detach/flush_cache wait for all GPU↔Host↔L3 async ops to drain
  • Gate behind not for_health_check to avoid blocking health check probes with background cache I/O
  • Follows up on [Bugfix] Fix write-through events not processed when scheduler is idle #20560 — that fix ensures check_hicache_events() runs when idle, but is_fully_idle() still didn't account for in-flight HiCache ops, allowing unsafe detach while GPU→Host writes are pending

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@hnyls2002
Copy link
Copy Markdown
Collaborator Author

/tag-and-rerun-ci

@hnyls2002
Copy link
Copy Markdown
Collaborator Author

/rerun-ut test_hicache_storage_runtime_attach_detach.py

@hnyls2002
Copy link
Copy Markdown
Collaborator Author

/rerun-ut test_hicache_storage_mooncake_backend.py

@github-actions
Copy link
Copy Markdown
Contributor

✅ Triggered /rerun-ut on 2-gpu-runner runner:

cd test/ && python3 registered/hicache/test_hicache_storage_runtime_attach_detach.py

@github-actions
Copy link
Copy Markdown
Contributor

✅ Triggered /rerun-ut on 2-gpu-runner runner:

cd test/ && python3 registered/hicache/test_hicache_storage_mooncake_backend.py

@github-actions
Copy link
Copy Markdown
Contributor

🔗 View workflow run

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

🔗 View workflow run

@github-actions github-actions Bot added the hicache Hierarchical Caching for SGLang label Mar 17, 2026
The new is_fully_idle() HiCache check may cause flush_cache to fail
when async ops (GPU↔Host↔L3) are still in-flight after requests
complete. Add a shared retry helper and use it in all HiCache tests.
@hnyls2002 hnyls2002 merged commit 4d3976b into main Mar 18, 2026
28 of 45 checks passed
@hnyls2002 hnyls2002 deleted the lsyin/fix-hicache-attach branch March 18, 2026 00:28
Wangzheee pushed a commit to Wangzheee/sglang that referenced this pull request Mar 21, 2026
0-693 pushed a commit to 0-693/sglang that referenced this pull request Mar 25, 2026
dutsc pushed a commit to dutsc/sglang that referenced this pull request Mar 30, 2026
KHAEntertainment pushed a commit to Clarit-AI/Engram that referenced this pull request Mar 31, 2026
JustinTong0323 pushed a commit to JustinTong0323/sglang that referenced this pull request Apr 7, 2026
yhyang201 pushed a commit to yhyang201/sglang that referenced this pull request Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hicache Hierarchical Caching for SGLang run-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant