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