mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
issue: https://github.com/milvus-io/milvus/issues/46743 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary **Core Invariant:** Sort compaction tasks must not be created concurrently for the same segment. The system relies on atomic check-and-set semantics to prevent duplicate task creation. **What Logic is Improved:** The code now guards sort compaction task creation with an explicit `CheckAndSetSegmentsCompacting` check before calling `createSortCompactionTask`. Previously, tasks could be attempted for segments already undergoing compaction, triggering warning logs that incorrectly suggested task creation failures. The fix skips task creation when a segment is already compacting, avoiding these misleading warnings entirely. **Why No Data Loss or Regression:** - The `CheckAndSetSegmentsCompacting` method atomically checks whether a segment is already being compacted and only proceeds if it's not; this is the correct guard pattern for preventing concurrent compactions - When a segment is already compacting (`isCompacting == true`), the code correctly increments the done counter and skips to the next segment, which is the intended behavior (no wasted task creation attempts) - The function signature change to `createSortCompactionTask` adds only an internal parameter (the current task context for logging); no public APIs are affected - Logging refactoring maintains semantic equivalence while providing task-scoped context **Concrete Fix:** The misleading warning during sort compaction is eliminated by preventing task creation attempts for already-compacting segments through the mutex-protected `CheckAndSetSegmentsCompacting` guard, rather than attempting creation and failing downstream. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
Data Node
DataNode is the component to write insert and delete messages into persistent blob storage, for example MinIO or S3.
Dependency
- KV store: a kv store that persists messages into blob storage.
- Message stream: receive messages and publish information
- Root Coordinator: get the latest unique IDs.
- Data Coordinator: get the flush information and which message stream to subscribe.