mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +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 {
|
||||
s.paramMutex.Lock()
|
||||
defer s.paramMutex.Unlock()
|
||||
s.paramMutex.RLock()
|
||||
defer s.paramMutex.RUnlock()
|
||||
if _, ok := s.indexInfos[fieldID]; !ok {
|
||||
return ""
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user