congqixia 9ed77d4484
fix: [2.5] prevent data race in querycoord collection notifier update (#45037) (#45052)
Cherry-pick from master
pr: #45037
Fixes #45035

This commit addresses a data race issue where refreshCollection was
updating the collection notifier without proper lock protection.

Changes:
- Add UpdateCollection method to CollectionManager with proper locking
- Introduce CollectionOperator pattern for thread-safe collection
updates
- Make setRefreshNotifier private and use it through the operator
pattern
- Update refreshCollection to use the new UpdateCollection method
- Handle collection not found error gracefully in refreshCollection

The CollectionOperator pattern ensures all collection modifications go
through the CollectionManager's lock, preventing concurrent access
issues.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-10-23 19:34:12 +08:00
..
2023-01-10 16:15:37 +08:00