mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 20:09:57 +08:00
Narrow the scope of deleteMut lock in loadStreamDelete (#25436)
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
This commit is contained in:
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
Block a user