mirror of https://github.com/milvus-io/milvus.git
Narrow the scope of deleteMut lock in loadStreamDelete (#25436)
Signed-off-by: Ted Yu <yuzhihong@gmail.com>pull/25595/head
parent
51c348158b
commit
a7023ab3cc
|
@ -375,13 +375,13 @@ func (sd *shardDelegator) loadStreamDelete(ctx context.Context,
|
|||
deltaPositions []*msgpb.MsgPosition,
|
||||
targetNodeID int64, worker cluster.Worker) error {
|
||||
log := sd.getLogger(ctx)
|
||||
sd.deleteMut.Lock()
|
||||
defer sd.deleteMut.Unlock()
|
||||
|
||||
idCandidates := lo.SliceToMap(candidates, func(candidate *pkoracle.BloomFilterSet) (int64, *pkoracle.BloomFilterSet) {
|
||||
return candidate.ID(), candidate
|
||||
})
|
||||
|
||||
sd.deleteMut.Lock()
|
||||
defer sd.deleteMut.Unlock()
|
||||
// apply buffered delete for new segments
|
||||
// no goroutines here since qnv2 has no load merging logic
|
||||
for i, info := range infos {
|
||||
|
|
Loading…
Reference in New Issue