mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 02:48:45 +08:00
fix: [2.4] Re-read value after once
initialization (#35643)
Cherry-pick from master pr: #35642 Related to #35641 See also #35271 Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
e014ad9280
commit
9c67965d6c
@ -41,12 +41,14 @@ func getPriCache() *PrivilegeCache {
|
||||
priCacheInitOnce.Do(func() {
|
||||
priCacheMut.Lock()
|
||||
defer priCacheMut.Unlock()
|
||||
c = &PrivilegeCache{
|
||||
priCache = &PrivilegeCache{
|
||||
version: ver.Inc(),
|
||||
values: typeutil.ConcurrentMap[string, bool]{},
|
||||
}
|
||||
priCache = c
|
||||
})
|
||||
priCacheMut.RLock()
|
||||
defer priCacheMut.RUnlock()
|
||||
c = priCache
|
||||
}
|
||||
|
||||
return c
|
||||
|
Loading…
Reference in New Issue
Block a user