mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-08 01:58:34 +08:00
Use read lock when only read the var (#12712)
Signed-off-by: Cai.Zhang <cai.zhang@zilliz.com>
This commit is contained in:
parent
395af1404f
commit
1f67ab4e09
@ -462,8 +462,8 @@ func (s *Segment) setBuildID(fieldID int64, id UniqueID) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Segment) getIndexName(fieldID int64) string {
|
func (s *Segment) getIndexName(fieldID int64) string {
|
||||||
s.paramMutex.Lock()
|
s.paramMutex.RLock()
|
||||||
defer s.paramMutex.Unlock()
|
defer s.paramMutex.RUnlock()
|
||||||
if _, ok := s.indexInfos[fieldID]; !ok {
|
if _, ok := s.indexInfos[fieldID]; !ok {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user