Skip to content

Commit

Permalink
Revert "fix concurrency problem"
Browse files Browse the repository at this point in the history
This reverts commit d7f83ec.
  • Loading branch information
zouyx committed Nov 12, 2020
1 parent d7f83ec commit 2fd2269
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions env/file/json/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"encoding/json"
"fmt"
"github.com/zouyx/agollo/v4/env/config"
"sync"

"github.com/zouyx/agollo/v4/component/log"
jsonConfig "github.com/zouyx/agollo/v4/env/config/json"
Expand All @@ -36,8 +35,6 @@ var (
jsonFileConfig = &jsonConfig.ConfigFile{}
//configFileMap 存取namespace文件地址
configFileMap = make(map[string]string, 1)
//configFileMapLock configFileMap的读取锁
configFileMapLock sync.Mutex
)

// FileHandler 默认备份文件读写
Expand All @@ -52,8 +49,6 @@ func (fileHandler *FileHandler) WriteConfigFile(config *config.ApolloConfig, con
// GetConfigFile get real config file
func (fileHandler *FileHandler) GetConfigFile(configDir string, appID string, namespace string) string {
key := fmt.Sprintf("%s-%s", appID, namespace)
configFileMapLock.Lock()
defer configFileMapLock.Unlock()
fullPath := configFileMap[key]
if fullPath == "" {
filePath := fmt.Sprintf("%s%s", key, Suffix)
Expand Down

0 comments on commit 2fd2269

Please sign in to comment.