mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Use Wlock when release segment (#20092)
Signed-off-by: bigsheeper <yihao.dai@zilliz.com> Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
This commit is contained in:
parent
c24244240e
commit
51e50bba73
@ -635,15 +635,15 @@ func (replica *metaReplica) removeSegment(segmentID UniqueID, segType segmentTyp
|
||||
case segmentTypeGrowing:
|
||||
if segment, ok := replica.growingSegments[segmentID]; ok {
|
||||
if collection, ok := replica.collections[segment.collectionID]; ok {
|
||||
collection.RLock()
|
||||
defer collection.RUnlock()
|
||||
collection.Lock()
|
||||
defer collection.Unlock()
|
||||
}
|
||||
}
|
||||
case segmentTypeSealed:
|
||||
if segment, ok := replica.sealedSegments[segmentID]; ok {
|
||||
if collection, ok := replica.collections[segment.collectionID]; ok {
|
||||
collection.RLock()
|
||||
defer collection.RUnlock()
|
||||
collection.Lock()
|
||||
defer collection.Unlock()
|
||||
}
|
||||
}
|
||||
default:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user