mirror of
https://github.com/prometheus/prometheus.git
synced 2026-03-03 20:52:01 +01:00
Remove the separate scrapeFailureLoggerMtx and use targetMtx instead for synchronizing access to scrapeFailureLogger. This fixes a data race where Sync() would read scrapeFailureLogger while holding targetMtx but SetScrapeFailureLogger() would write to it while holding a different mutex. Add regression test to catch concurrent access issues. Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>