prometheus/scrape
Łukasz Mierzwa c528293376
Enhancement: Reload all scrape pools concurrently (#16595)
* Reload all scrape pools concurrently

At the moment all scrape pools that need to be reloaded are reloaded one by one. While reloads are ongoing mtxScrape is locked.
For each pool that's being reloaded we need to wait until all targets are updated.
This whole process can take a while and the more scrape pools to reload the longer.
At the same time all pools are independent and there's no real reason to do them one-by-one.
Reload each pool in a seperate goroutine so we finish config reload as ASAP as possible and unlock the mtxScrape.

Signed-off-by: Lukasz Mierzwa <l.mierzwa@gmail.com>

* Address PR review feedback

Signed-off-by: Lukasz Mierzwa <l.mierzwa@gmail.com>

---------

Signed-off-by: Lukasz Mierzwa <l.mierzwa@gmail.com>
2025-06-09 16:01:35 +02:00
..
testdata Include test CA text info (#14699) 2024-08-20 19:41:02 +02:00
clientprotobuf.go chore: enable gci linter (#16245) 2025-03-22 15:46:13 +00:00
helpers_test.go refactor: use a more straightforward return value (#16070) 2025-02-24 12:25:57 +00:00
manager_test.go chore: enable gci linter (#16245) 2025-03-22 15:46:13 +00:00
manager.go Enhancement: Reload all scrape pools concurrently (#16595) 2025-06-09 16:01:35 +02:00
metrics.go Scraping: add metric for symbol table size 2024-07-05 10:16:22 +01:00
scrape_test.go feature: type-and-unit-labels (PROM-39 implementation) (#16228) 2025-05-17 09:37:25 +00:00
scrape.go feature: type-and-unit-labels (PROM-39 implementation) (#16228) 2025-05-17 09:37:25 +00:00
target_test.go chore: enable unused-parameter from revive 2025-02-19 19:50:28 +01:00
target.go Fix linting issues found by golangci-lint v2.0.2 (#16368) 2025-05-03 19:05:13 +02:00