From beaf91a412888f0fbe36e43d4d81fb595b50009f Mon Sep 17 00:00:00 2001 From: ahfa92 Date: Mon, 8 Apr 2024 17:33:13 +0700 Subject: [PATCH] Remove lock from initiation --- cluster/cluster.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cluster/cluster.go b/cluster/cluster.go index f3c899c5a..5568aa0e2 100644 --- a/cluster/cluster.go +++ b/cluster/cluster.go @@ -487,11 +487,6 @@ func (cluster *Cluster) initOrchetratorNodes() { return } cluster.inInitNodes = true - cluster.Lock() - defer func() { - cluster.inInitNodes = false - cluster.Unlock() - }() //defer cluster.insideInitNodes = false //cluster.LogModulePrintf(cluster.Conf.Verbose, config.ConstLogModGeneral,LvlInfo, "Loading nodes from orchestrator %s", cluster.Conf.ProvOrchestrator) @@ -511,6 +506,7 @@ func (cluster *Cluster) initOrchetratorNodes() { } cluster.SetAgentsCpuCoreMem() + cluster.inInitNodes = false }