fix: [2.5] dropped segment in excluded segment use wrong excluded ts (#44771)

relate: https://github.com/milvus-io/milvus/issues/43114
pr: https://github.com/milvus-io/milvus/pull/43115
https://github.com/milvus-io/milvus/pull/44769

---------

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
This commit is contained in:
aoiasd 2025-10-15 15:06:01 +08:00 committed by GitHub
parent 47949fd883
commit 71fc23dd24
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -144,8 +144,14 @@ func (sd *shardDelegator) ProcessInsert(insertRecords map[int64]*InsertData) {
if newGrowingSegment {
sd.growingSegmentLock.Lock()
// check whether segment has been excluded
if ok := sd.VerifyExcludedSegments(segmentID, typeutil.MaxTimestamp); !ok {
// Forbid create growing segment in excluded segment
// (Now excluded ts may not worked for growing segment with multiple partition.
// Because use checkpoint ts as excluded ts when add excluded, but it may less than last message ts.
// And cause some invalid message not filtered out and create growing again.
// So we forbid all segment in excluded segment create here.)
// TODO:
// Use right ts when add excluded segment. And Verify with insert ts here.
if ok := sd.VerifyExcludedSegments(segmentID, 0); !ok {
log.Warn("try to insert data into released segment, skip it", zap.Int64("segmentID", segmentID))
sd.growingSegmentLock.Unlock()
growing.Release(context.Background())