未验证 提交 6c1a4715 编写于 作者: C cai.zhang 提交者: GitHub

Use read lock when only read the var (#12627)

Signed-off-by: NCai.Zhang <cai.zhang@zilliz.com>
上级 847d3e7d
......@@ -498,8 +498,8 @@ func (s *Segment) getIndexPaths(fieldID int64) []string {
}
func (s *Segment) getIndexParams(fieldID int64) map[string]string {
s.paramMutex.Lock()
defer s.paramMutex.Unlock()
s.paramMutex.RLock()
defer s.paramMutex.RUnlock()
if _, ok := s.indexInfos[fieldID]; !ok {
return nil
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册