mirror of https://github.com/milvus-io/milvus.git
fix: merge sort segment loss data (#37400)
relate: https://github.com/milvus-io/milvus/issues/37238 Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>pull/37501/head
parent
51ed2a61c8
commit
b4c749dcd5
|
@ -105,6 +105,12 @@ func mergeSortMultipleSegments(ctx context.Context,
|
||||||
deletedRowCount++
|
deletedRowCount++
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Filtering expired entity
|
||||||
|
if isExpiredEntity(collectionTtl, currentTs, typeutil.Timestamp(v.Timestamp)) {
|
||||||
|
expiredRowCount++
|
||||||
|
continue
|
||||||
|
}
|
||||||
return v, nil
|
return v, nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -125,12 +131,6 @@ func mergeSortMultipleSegments(ctx context.Context,
|
||||||
smallest := heap.Pop(&pq).(*PQItem)
|
smallest := heap.Pop(&pq).(*PQItem)
|
||||||
v := smallest.Value
|
v := smallest.Value
|
||||||
|
|
||||||
// Filtering expired entity
|
|
||||||
if isExpiredEntity(collectionTtl, currentTs, typeutil.Timestamp(v.Timestamp)) {
|
|
||||||
expiredRowCount++
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
err := mWriter.Write(v)
|
err := mWriter.Write(v)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warn("compact wrong, failed to writer row", zap.Error(err))
|
log.Warn("compact wrong, failed to writer row", zap.Error(err))
|
||||||
|
|
Loading…
Reference in New Issue