[Bugfix][KV Offload] Do not let mark_miss() flip a pending or in-flight async lookup probe (#59096)

Signed-off-by: Sohom Chakraborty <16609933+sohom-cs@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Kevin H. Luu <khluu000@gmail.com>
This commit is contained in:
Sohom chakraborty
2026-10-15 10:57:46 +03:00
committed by GitHub
co-authored by Claude Kevin H. Luu
parent 8fa5ae844a
commit fc8e08a2a6
3 changed files with 68 additions and 3 deletions
+5 -3
View File
@@ -220,12 +220,14 @@ class AsyncLookupManager(ABC):
def mark_miss(self, keys: Collection[OffloadKey]) -> None:
"""Force the cached verdict for ``keys`` to False after a failed load, so
the scheduler stops re-issuing the doomed promotion (livelock, #49176).
Keys with no cached entry are skipped."""
Keys with no cached entry are skipped, and so are keys whose entry is
a newer probe still PENDING or IN_FLIGHT: its own result will land,
and forcing it to RESOLVED here would trip the phase asserts in
flush() / drain_results() on the scheduler thread."""
for key in keys:
state = self._lookup_state.get(key)
if state is not None:
if state is not None and state.phase is LookupPhase.RESOLVED:
state.result = False
state.phase = LookupPhase.RESOLVED
def cleanup(self, req_id: str) -> None:
"""Release request references, retaining in-flight lookups.