mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-01 11:29:48 +08:00
release manager Rlock (#18773)
Signed-off-by: wanggang11335 <wanggang11335@autohome.com.cn> Signed-off-by: wanggang11335 <wanggang11335@autohome.com.cn> Co-authored-by: wanggang11335 <wanggang11335@autohome.com.cn>
This commit is contained in:
parent
0c9a10e8f8
commit
16ccefc678
@ -66,7 +66,7 @@ func (m *Manager) GetConfig(key string) (string, error) {
|
|||||||
//GetConfigsByPattern returns key values that matched pattern
|
//GetConfigsByPattern returns key values that matched pattern
|
||||||
func (m *Manager) GetConfigsByPattern(pattern string) map[string]string {
|
func (m *Manager) GetConfigsByPattern(pattern string) map[string]string {
|
||||||
m.RLock()
|
m.RLock()
|
||||||
defer m.RLock()
|
defer m.RUnlock()
|
||||||
matchedConfig := make(map[string]string)
|
matchedConfig := make(map[string]string)
|
||||||
pattern = strings.ToLower(pattern)
|
pattern = strings.ToLower(pattern)
|
||||||
for key, value := range m.keySourceMap {
|
for key, value := range m.keySourceMap {
|
||||||
@ -86,7 +86,7 @@ func (m *Manager) GetConfigsByPattern(pattern string) map[string]string {
|
|||||||
// Configs returns all the key values
|
// Configs returns all the key values
|
||||||
func (m *Manager) Configs() map[string]string {
|
func (m *Manager) Configs() map[string]string {
|
||||||
m.RLock()
|
m.RLock()
|
||||||
defer m.RLock()
|
defer m.RUnlock()
|
||||||
config := make(map[string]string)
|
config := make(map[string]string)
|
||||||
|
|
||||||
for key, value := range m.keySourceMap {
|
for key, value := range m.keySourceMap {
|
||||||
|
Loading…
Reference in New Issue
Block a user