From 190addffd824be62b590360b894b183a8c074f6f Mon Sep 17 00:00:00 2001 From: Julien Pivotto Date: Sat, 11 Jul 2020 15:37:13 +0200 Subject: [PATCH] Change Scrape Loop mtx to Mutex (#7553) It was still RWLock but we never use the read lock.. Signed-off-by: Julien Pivotto --- scrape/scrape.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scrape/scrape.go b/scrape/scrape.go index 4c6d3bab00d..3b792d46928 100644 --- a/scrape/scrape.go +++ b/scrape/scrape.go @@ -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 @@ -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++ }