[Runtime][Cache] Detect and repair corrupted cache entries (#3074)

Harden cache entries against partial writes
This commit is contained in:
Lei Wang
2026-08-24 17:15:45 +08:00
committed by GitHub
parent 75382444d6
commit fded655836
8 changed files with 405 additions and 4 deletions
@@ -64,6 +64,7 @@ def _write_complete_kernel_cache_entry(
(cache_path / cache.kernel_lib_path).write_bytes(b"fake-so")
with (cache_path / cache.params_path).open("wb") as f:
cloudpickle.dump(["param"], f)
cache._write_manifest(str(cache_path))
return cache_path