From b3b58c9a3ccb781edbbb5522b241c7bfe0fe61a8 Mon Sep 17 00:00:00 2001 From: Laurence <45508533+LaurenceLiZhixin@users.noreply.github.com> Date: Sun, 18 Jul 2021 15:45:43 +0800 Subject: [PATCH] Revert "add lock (#1304)" (#1329) This reverts commit a10996763e3e1ffa5cdbd80cb49319a4e3626994. --- config/config_loader.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/config/config_loader.go b/config/config_loader.go index 745dbd85e3..039d8fccb6 100644 --- a/config/config_loader.go +++ b/config/config_loader.go @@ -441,8 +441,6 @@ func GetApplicationConfig() *ApplicationConfig { // if not found, create new one func GetProviderConfig() ProviderConfig { if providerConfig == nil { - configAccessMutex.Lock() - defer configAccessMutex.Unlock() if providerConfig == nil { return ProviderConfig{} } @@ -457,8 +455,6 @@ func GetProviderConfig() ProviderConfig { // So you don't need to worry about the race condition func GetConsumerConfig() ConsumerConfig { if consumerConfig == nil { - configAccessMutex.Lock() - defer configAccessMutex.Unlock() if consumerConfig == nil { return ConsumerConfig{} }