fix: HiRadixCache: fix prefetch completion race (#9397)
This commit is contained in:
committed by
GitHub
parent
79e6a8a6ac
commit
a3aee7c377
@@ -434,9 +434,12 @@ class HiRadixCache(RadixCache):
|
||||
if self.prefetch_stop_policy == "best_effort":
|
||||
return can_terminate
|
||||
|
||||
completed = (
|
||||
operation.completed_tokens == len(operation.hash_value) * self.page_size
|
||||
)
|
||||
if len(operation.hash_value) == 0:
|
||||
completed = False
|
||||
else:
|
||||
completed = (
|
||||
operation.completed_tokens == len(operation.hash_value) * self.page_size
|
||||
)
|
||||
|
||||
if self.prefetch_stop_policy == "wait_complete":
|
||||
can_terminate = completed
|
||||
|
||||
Reference in New Issue
Block a user