mirror of https://github.com/milvus-io/milvus.git
enhance: change protection to RLock for loadStreamDelete (#29450)
See also: #29332 Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/29471/head
parent
1d6bcd1ded
commit
ac95c52171
|
@ -101,7 +101,7 @@ type shardDelegator struct {
|
|||
level0Mut sync.RWMutex
|
||||
level0Deletions map[int64]*storage.DeleteData // partitionID -> deletions
|
||||
// stream delete buffer
|
||||
deleteMut sync.Mutex
|
||||
deleteMut sync.RWMutex
|
||||
deleteBuffer deletebuffer.DeleteBuffer[*deletebuffer.Item]
|
||||
// dispatcherClient msgdispatcher.Client
|
||||
factory msgstream.Factory
|
||||
|
|
|
@ -570,8 +570,8 @@ func (sd *shardDelegator) loadStreamDelete(ctx context.Context,
|
|||
return candidate.ID(), candidate
|
||||
})
|
||||
|
||||
sd.deleteMut.Lock()
|
||||
defer sd.deleteMut.Unlock()
|
||||
sd.deleteMut.RLock()
|
||||
defer sd.deleteMut.RUnlock()
|
||||
// apply buffered delete for new segments
|
||||
// no goroutines here since qnv2 has no load merging logic
|
||||
for _, info := range infos {
|
||||
|
|
Loading…
Reference in New Issue