Unverified Commit 4a52faf2 by 李国忠 Committed by GitHub

Unnecessary go routine spawn. (#7951)

Signed-off-by: 's avatarfuling <fuling.lgz@alibaba-inc.com>
parent 7aa5fb01
......@@ -954,14 +954,12 @@ func (m *Manager) Update(interval time.Duration, files []string, externalLabels
oldg.stop()
newg.CopyState(oldg)
}
go func() {
// Wait with starting evaluation until the rule manager
// is told to run. This is necessary to avoid running
// queries against a bootstrapping storage.
<-m.block
newg.run(m.opts.Context)
}()
wg.Done()
// Wait with starting evaluation until the rule manager
// is told to run. This is necessary to avoid running
// queries against a bootstrapping storage.
<-m.block
newg.run(m.opts.Context)
}(newg)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment