Skip to content

Commit

Permalink
fix: bcs-service-prometheus生成node发生死锁问题 TencentBlueKing#564
Browse files Browse the repository at this point in the history
  • Loading branch information
zmberg committed Aug 31, 2020
1 parent 524dcb9 commit 25e9a60
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ func (disc *nodeEtcdDiscovery) Start() error {
}

func (disc *nodeEtcdDiscovery) GetPrometheusSdConfig(module string) ([]*types.PrometheusSdConfig, error) {
disc.Lock()
disc.Unlock()
promConfigs := make([]*types.PrometheusSdConfig, 0)
for nodeIp, _ := range disc.nodes {
switch disc.module {
Expand Down Expand Up @@ -136,9 +134,6 @@ func (disc *nodeEtcdDiscovery) RegisterEventFunc(handleFunc EventHandleFunc) {
}

func (disc *nodeEtcdDiscovery) OnAdd(obj interface{}) {
disc.Lock()
defer disc.Unlock()

agent, ok := obj.(*apisbkbcsv2.Agent)
if !ok {
blog.Errorf("cannot convert to *apisbkbcsv2.Agent: %v", obj)
Expand All @@ -161,9 +156,6 @@ func (disc *nodeEtcdDiscovery) OnUpdate(old, cur interface{}) {
}

func (disc *nodeEtcdDiscovery) OnDelete(obj interface{}) {
disc.Lock()
defer disc.Unlock()

agent, ok := obj.(*apisbkbcsv2.Agent)
if !ok {
blog.Errorf("cannot convert to *apisbkbcsv2.Agent: %v", obj)
Expand Down

0 comments on commit 25e9a60

Please sign in to comment.