[Hicache] Generic page get bugfix (#9909)

This commit is contained in:
ykwd
2025-09-02 20:22:06 +08:00
committed by GitHub
parent 18f91eb639
commit 53976fce97

View File

@@ -659,13 +659,14 @@ class HiCacheController:
f"Prefetch operation {operation.request_id} failed to retrieve page {hash_values[i]}."
)
break
if operation.increment(self.page_size):
self.mem_pool_host.set_from_flat_data_page(
host_indices[i * self.page_size],
page_data[i],
)
else:
break
# Must set the data before increasing the completed tokens.
# Otherwise this page may be read before being set.
self.mem_pool_host.set_from_flat_data_page(
host_indices[i * self.page_size],
page_data[i],
)
if not operation.increment(self.page_size):
break # Operation terminated by controller
def _page_transfer(self, operation):
# Select the get function and batch size