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