mirror of https://github.com/milvus-io/milvus.git
fix: fix search/query/count may access same growing and sealed segment (#36258)
issue: #36257 during syncTargetVersion, sealed segment should be excluded, to avoid it's growing segment be conusmed from stream again. Signed-off-by: Wei Liu <wei.liu@zilliz.com>pull/36281/head
parent
d07338b4b9
commit
329fb421cd
|
|
@ -1312,6 +1312,13 @@ func (node *QueryNode) SyncDistribution(ctx context.Context, req *querypb.SyncDi
|
|||
return id, action.GetCheckpoint().Timestamp
|
||||
})
|
||||
shardDelegator.AddExcludedSegments(droppedInfos)
|
||||
flushedInfo := lo.SliceToMap(action.GetSealedInTarget(), func(id int64) (int64, uint64) {
|
||||
if action.GetCheckpoint() == nil {
|
||||
return id, typeutil.MaxTimestamp
|
||||
}
|
||||
return id, action.GetCheckpoint().Timestamp
|
||||
})
|
||||
shardDelegator.AddExcludedSegments(flushedInfo)
|
||||
shardDelegator.SyncTargetVersion(action.GetTargetVersion(), action.GetGrowingInTarget(),
|
||||
action.GetSealedInTarget(), action.GetDroppedInTarget(), action.GetCheckpoint())
|
||||
case querypb.SyncType_UpdatePartitionStats:
|
||||
|
|
|
|||
Loading…
Reference in New Issue