[KV Offload] Return None from lookup() for in-flight blocks (#41795)

Signed-off-by: Ronen Schaffer <ronen.schaffer@ibm.com>
This commit is contained in:
Ronen Schaffer
2026-05-06 17:31:21 +03:00
committed by GitHub
parent 6467213a9f
commit f39bcf1e30
2 changed files with 11 additions and 7 deletions
+5 -1
View File
@@ -86,7 +86,11 @@ class CPUOffloadingManager(OffloadingManager):
def lookup(self, key: OffloadKey, req_context: ReqContext) -> bool | None:
block = self._policy.get(key)
return block is not None and block.is_ready
if block is None:
return False
if not block.is_ready:
return None # write in-flight; caller should retry
return True
def prepare_load(
self,