mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 10:59:32 +08:00
enhance: change protection to RLock for loadStreamDelete (#29450)
See also: #29332 Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
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
Block a user