mirror of https://github.com/milvus-io/milvus.git
Fix read lock to write lock (#19464)
Signed-off-by: yangxuan <xuan.yang@zilliz.com> Signed-off-by: yangxuan <xuan.yang@zilliz.com>pull/19450/head
parent
2c7257c2ee
commit
f6e7b92db6
|
@ -643,8 +643,8 @@ func (replica *SegmentReplica) hasSegment(segID UniqueID, countFlushed bool) boo
|
|||
return inNew || inNormal || inFlush
|
||||
}
|
||||
func (replica *SegmentReplica) refreshFlushedSegStatistics(segID UniqueID, numRows int64) {
|
||||
replica.segMu.RLock()
|
||||
defer replica.segMu.RUnlock()
|
||||
replica.segMu.Lock()
|
||||
defer replica.segMu.Unlock()
|
||||
|
||||
if seg, ok := replica.flushedSegments[segID]; ok {
|
||||
seg.memorySize = 0
|
||||
|
|
Loading…
Reference in New Issue