Unverified Commit a3aee7c3 authored by Pablo Iyu Guerrero's avatar Pablo Iyu Guerrero Committed by GitHub
Browse files

fix: HiRadixCache: fix prefetch completion race (#9397)

parent 79e6a8a6
...@@ -434,9 +434,12 @@ class HiRadixCache(RadixCache): ...@@ -434,9 +434,12 @@ class HiRadixCache(RadixCache):
if self.prefetch_stop_policy == "best_effort": if self.prefetch_stop_policy == "best_effort":
return can_terminate return can_terminate
completed = ( if len(operation.hash_value) == 0:
operation.completed_tokens == len(operation.hash_value) * self.page_size completed = False
) else:
completed = (
operation.completed_tokens == len(operation.hash_value) * self.page_size
)
if self.prefetch_stop_policy == "wait_complete": if self.prefetch_stop_policy == "wait_complete":
can_terminate = completed can_terminate = completed
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment