Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
qorus
prometheus
Commits
17683d07
Commit
17683d07
authored
Jan 22, 2020
by
johncming
Committed by
Brian Brazil
Jan 22, 2020
Browse files
discovery: fix bug that use rlock for read. (#5928)
Signed-off-by:
johncming
<
johncming@yahoo.com
>
parent
7d159b2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
discovery/manager.go
View file @
17683d07
...
...
@@ -304,8 +304,8 @@ func (m *Manager) updateGroup(poolKey poolKey, tgs []*targetgroup.Group) {
}
func
(
m
*
Manager
)
allGroups
()
map
[
string
][]
*
targetgroup
.
Group
{
m
.
mtx
.
Lock
()
defer
m
.
mtx
.
Unlock
()
m
.
mtx
.
R
Lock
()
defer
m
.
mtx
.
R
Unlock
()
tSets
:=
map
[
string
][]
*
targetgroup
.
Group
{}
for
pkey
,
tsets
:=
range
m
.
targets
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment