[KV Offload] Pass ReqContext to touch(), complete_load(), and complete_store() (#41366)

Signed-off-by: Ronen Schaffer <ronen.schaffer@ibm.com>
This commit is contained in:
Ronen Schaffer
2026-05-10 15:09:25 +03:00
committed by GitHub
parent a54f0d1049
commit e175192d33
5 changed files with 70 additions and 50 deletions
+11 -3
View File
@@ -147,22 +147,24 @@ class OffloadingManager(ABC):
"""
pass
def touch(self, keys: Collection[OffloadKey]):
def touch(self, keys: Collection[OffloadKey], req_context: ReqContext):
"""
Mark the given blocks as recently used.
This could in practice mean moving them to the end of an LRU list.
Args:
keys: the keys identifying the blocks.
req_context: per-request context (e.g. kv_transfer_params).
"""
return
def complete_load(self, keys: Collection[OffloadKey]):
def complete_load(self, keys: Collection[OffloadKey], req_context: ReqContext):
"""
Marks previous blocks that were prepared to load as done loading.
Args:
keys: the keys identifying the blocks.
req_context: per-request context (e.g. kv_transfer_params).
"""
return
@@ -189,7 +191,12 @@ class OffloadingManager(ABC):
"""
pass
def complete_store(self, keys: Collection[OffloadKey], success: bool = True):
def complete_store(
self,
keys: Collection[OffloadKey],
req_context: ReqContext,
success: bool = True,
):
"""
Marks blocks which were previously prepared to be stored, as stored.
Following this call, the blocks become loadable.
@@ -198,6 +205,7 @@ class OffloadingManager(ABC):
Args:
keys: the keys identifying the blocks.
req_context: per-request context (e.g. kv_transfer_params).
success: whether the blocks were stored successfully.
"""
return