Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
Description
Prometheus-exporter is supposed to read metrics from Solr servers every 60 seconds (scrape interval can be changed using --scrape-interval argument). But the truth is it does it every 60+X seconds where X is the time needed to read metrics from all Solr servers. In my case X is 1-2 s. If Prometheus scrapes the exporter every 60 seconds it can lead to duplicated samples (e.g. metrics will stay the same for 2 minutes).
It's result of using scheduler.scheduleWithFixedDelay instead of
scheduler.scheduleAtFixedRate.
Note: function scheduled with scheduleAtFixedRate can still be started late if previous execution has not finished. There is no risk of overlapping executions.
I am going to prepare a PR.
Attachments
Attachments
Issue Links
- links to