mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 09:08:43 +08:00
fix: Fix intermittent deadlock in grouped allocator (#42524)
issue: #42523 Resolve deadlock issue in GroupedAllocator where resource release notifications fail to propagate across hierarchy levels, causing child allocators to wait indefinitely. Changes include: - Add recursive notify() method to GroupedAllocator - Ensure all child allocators receive resource release notifications - Fix TOCTOU race condition in hierarchical resource management This resolves the intermittent test timeout in TestGroupedAllocator test that exhibited deadlock due to missed condition notifications. Signed-off-by: Wei Liu <wei.liu@zilliz.com>
This commit is contained in:
parent
0c4b12565e
commit
347acf62de
@ -110,6 +110,14 @@ func (ga *GroupedAllocator) GetAllocator(name string) Allocator[string] {
|
||||
return ga.children[name]
|
||||
}
|
||||
|
||||
// Note: GroupedAllocator should notify its all children.
|
||||
func (ga *GroupedAllocator) notify() {
|
||||
ga.SharedAllocator.notify()
|
||||
for _, child := range ga.children {
|
||||
child.notify()
|
||||
}
|
||||
}
|
||||
|
||||
type GroupedAllocatorBuilder struct {
|
||||
ga GroupedAllocator
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user