[KVConnector] Enable get_block_ids_with_load_errors() in LMCache connector (#27978)

Signed-off-by: Zirui Liu <ziliu@ddn.com>
Signed-off-by: ziruiliu <ziliu@ddn.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Nicolò Lucchesi <nlucches@redhat.com>
This commit is contained in:
ziruiliu 2025-11-12 18:44:58 +08:00 committed by GitHub
parent a4730c1b4f
commit d143152308
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -136,6 +136,21 @@ class LMCacheConnectorV1(KVConnectorBase_V1):
"""
return self._lmcache_engine.get_finished(finished_req_ids)
def get_block_ids_with_load_errors(self) -> set[int]:
"""
Get the set of block IDs that failed to load.
Returns:
Set of block IDs that encountered load errors.
Empty set if no load errors occurred.
"""
method = getattr(self._lmcache_engine, "get_block_ids_with_load_errors", None)
if callable(method):
return method()
# Fallback for older versions that don't support this method
return set()
# ==============================
# Scheduler-side methods
# ==============================