mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> - Core invariant: TestWait must deterministically verify that FixedSizeAllocator.Wait() is notified when virtual resources are released, so an allocation blocked due to exhausted virtual capacity eventually succeeds after explicit deallocations. - Removed/simplified logic: replaced the previous flaky pattern that spawned 100 concurrent goroutines performing Reallocate with an explicit channel-synchronized release goroutine that performs 100 sequential negative Reallocate calls only after the test blocks on allocation. This eliminates timing-dependent concurrency and the nondeterministic i-based assertion. - Why no data loss or behavior regression: only the test changed — allocator implementation (Allocate/Reallocate/Release/Wait/notify) and public APIs are unchanged. The test now exercises the same code paths (Allocate fails, Wait blocks on cond, Reallocate/Release call notify), but in a deterministic order, so the allocator semantics and resource accounting (used, allocs map) remain unaffected. - Change type and intent: Enhancement/refactor of unit test stability — it tightens test synchronization to remove race-dependent assertions and ensure the Wait/notify mechanism is reliably exercised without modifying allocator logic. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>