Skip to content

Commit

Permalink
Change Scrape Loop mtx to Mutex (#7553)
Browse files Browse the repository at this point in the history
It was still RWLock but we never use the read lock..

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
  • Loading branch information
roidelapluie committed Jul 11, 2020
1 parent 6a00626 commit 190addf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scrape/scrape.go
Expand Up @@ -161,7 +161,7 @@ type scrapePool struct {
appendable storage.Appendable
logger log.Logger

mtx sync.RWMutex
mtx sync.Mutex
config *config.ScrapeConfig
client *http.Client
// Targets and loops must always be synchronized to have the same
Expand Down Expand Up @@ -1188,7 +1188,7 @@ loop:
}

// Increment added even if there's an error so we correctly report the
// number of samples remaining after relabelling.
// number of samples remaining after relabeling.
added++

}
Expand Down

0 comments on commit 190addf

Please sign in to comment.