mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 01:28:27 +08:00
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>
This commit is contained in:
parent
d07338b4b9
commit
329fb421cd
@ -1312,6 +1312,13 @@ func (node *QueryNode) SyncDistribution(ctx context.Context, req *querypb.SyncDi
|
|||||||
return id, action.GetCheckpoint().Timestamp
|
return id, action.GetCheckpoint().Timestamp
|
||||||
})
|
})
|
||||||
shardDelegator.AddExcludedSegments(droppedInfos)
|
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(),
|
shardDelegator.SyncTargetVersion(action.GetTargetVersion(), action.GetGrowingInTarget(),
|
||||||
action.GetSealedInTarget(), action.GetDroppedInTarget(), action.GetCheckpoint())
|
action.GetSealedInTarget(), action.GetDroppedInTarget(), action.GetCheckpoint())
|
||||||
case querypb.SyncType_UpdatePartitionStats:
|
case querypb.SyncType_UpdatePartitionStats:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user