Skip to content

Commit

Permalink
Remove race exclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdurham committed Nov 14, 2024
1 parent 18c2a8c commit 8500c49
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/component/prometheus/write/queue/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,17 @@ func (s *Queue) Update(args component.Arguments) error {
}
s.args = newArgs
// Figure out which endpoint is new, which is updated, and which needs to be gone.
// So add all the endpoints and then if they are in the new config then remove them from deletable.
deletableEndpoints := make(map[string]struct{})
for k := range s.endpoints {
deletableEndpoints[k] = struct{}{}
}

for _, epCfg := range s.args.Endpoints {
delete(deletableEndpoints, epCfg.Name)
ep, ok := s.endpoints[epCfg.Name]
ep, found := s.endpoints[epCfg.Name]
// If found stop and recreate.
if ok {
if found {
// Stop and loose all the signals in the queue.
// TODO drain the signals and re-add them
ep.Stop()
Expand Down

0 comments on commit 8500c49

Please sign in to comment.