[HiCache] fix: bound the controller reset join so a stalled storage thread cannot hang the scheduler (#40312)
This commit is contained in:
@@ -750,17 +750,15 @@ class HiCacheController:
|
||||
)
|
||||
|
||||
def reset(self):
|
||||
self.storage_stop_event.set()
|
||||
# Reuse detach's queue wakeups and bounded joins, and fail if any
|
||||
# storage thread remains alive before clearing shared state.
|
||||
self._stop_storage_threads()
|
||||
|
||||
self.write_queue.clear()
|
||||
self.load_queue.clear()
|
||||
self.ack_write_queue.clear()
|
||||
self.ack_load_queue.clear()
|
||||
if self.enable_storage:
|
||||
self.prefetch_thread.join()
|
||||
self.prefetch_io_aux_thread.join()
|
||||
self.prefetch_sync_thread.join()
|
||||
self.backup_thread.join()
|
||||
self.prefetch_queue.queue.clear()
|
||||
self.backup_queue.queue.clear()
|
||||
self.prefetch_buffer.queue.clear()
|
||||
|
||||
Reference in New Issue
Block a user