mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +08:00
Use write lock when writing the var (#12528)
Signed-off-by: Cai.Zhang <cai.zhang@zilliz.com>
This commit is contained in:
parent
a7af1042db
commit
deaf4a642c
@ -532,8 +532,8 @@ func (s *Segment) matchIndexParam(fieldID int64, indexParams indexParam) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Segment) setIndexInfo(fieldID int64, info *indexInfo) error {
|
func (s *Segment) setIndexInfo(fieldID int64, info *indexInfo) error {
|
||||||
s.paramMutex.RLock()
|
s.paramMutex.Lock()
|
||||||
defer s.paramMutex.RUnlock()
|
defer s.paramMutex.Unlock()
|
||||||
if s.indexInfos == nil {
|
if s.indexInfos == nil {
|
||||||
return errors.New("indexInfos hasn't been init")
|
return errors.New("indexInfos hasn't been init")
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user