[HiCache] Yield idle scheduler so storage workers can drain (#38504)

This commit is contained in:
Shuwen Wang
2026-09-17 10:56:11 +08:00
committed by GitHub
parent 241a5b9823
commit 33d46376a6
2 changed files with 7 additions and 2 deletions
@@ -1,6 +1,6 @@
"""on_idle's stalled-path load publish is wall-clock bounded.
A no-batch-but-not-idle stall spins on_idle without sleeping, so the gate must
A non-storage no-batch stall spins on_idle without sleeping, so the gate must
cap the O(queue) get_loads for both the DP-balancing writer and the load
socket. CPU-only: builds a bare Scheduler with mocked collaborators, like
test_scheduler_flush_cache.
@@ -23,6 +23,7 @@ class TestOnIdleStallPublish(CustomTestCase):
def _stalled_scheduler(self) -> Scheduler:
s = Scheduler.__new__(Scheduler)
s.scheduler_stage_metrics = None
s.enable_hicache_storage = False
s.maybe_send_health_check_signal = MagicMock()
s.is_fully_idle = MagicMock(return_value=False) # stalled, not idle
s.publish_load_snapshot = MagicMock(return_value=None)