[ 
https://issues.apache.org/jira/browse/SOLR-17276?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Smiley resolved SOLR-17276.
---------------------------------
    Fix Version/s: 9.7
       Resolution: Fixed

Thanks for contributing Rafal!

> Use fixed rate instead of fixed delay in prometheus-exporter
> ------------------------------------------------------------
>
>                 Key: SOLR-17276
>                 URL: https://issues.apache.org/jira/browse/SOLR-17276
>             Project: Solr
>          Issue Type: Improvement
>          Components: contrib - prometheus-exporter
>            Reporter: Rafał Harabień
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 9.7
>
>         Attachments: image-2024-05-06-18-10-30-739.png
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> 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).
> !image-2024-05-06-18-10-30-739.png!
> It's result of using 
> [scheduler.scheduleWithFixedDelay|https://github.com/apache/solr/blob/2bb2ada0a372f4d101b78df8d43e0fc44c8edbf3/solr/prometheus-exporter/src/java/org/apache/solr/prometheus/collector/SchedulerMetricsCollector.java#L77]
>  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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to