[Hicache] Generic page get bugfix (#9909)
This commit is contained in:
@@ -659,13 +659,14 @@ class HiCacheController:
|
|||||||
f"Prefetch operation {operation.request_id} failed to retrieve page {hash_values[i]}."
|
f"Prefetch operation {operation.request_id} failed to retrieve page {hash_values[i]}."
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
if operation.increment(self.page_size):
|
# 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(
|
self.mem_pool_host.set_from_flat_data_page(
|
||||||
host_indices[i * self.page_size],
|
host_indices[i * self.page_size],
|
||||||
page_data[i],
|
page_data[i],
|
||||||
)
|
)
|
||||||
else:
|
if not operation.increment(self.page_size):
|
||||||
break
|
break # Operation terminated by controller
|
||||||
|
|
||||||
def _page_transfer(self, operation):
|
def _page_transfer(self, operation):
|
||||||
# Select the get function and batch size
|
# Select the get function and batch size
|
||||||
|
|||||||
Reference in New Issue
Block a user