[ 
https://issues.apache.org/jira/browse/SOLR-15301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17423905#comment-17423905
 ] 

Andrzej Bialecki commented on SOLR-15301:
-----------------------------------------

We should not use two different implementations that try to address the same 
problem. In this particular case we could either add a utility method in 
{{SolrMetricsContext.cachedGauge}} to wrap gauges that are expensive (although 
here this would still cause multiple calculations when the value expires), or 
add a utility method to {{SolrCore}} to create a single instance of this gauge 
and register this instance directly in these three places.

> Eliminate repetitive index size calculation for Solr metrics
> ------------------------------------------------------------
>
>                 Key: SOLR-15301
>                 URL: https://issues.apache.org/jira/browse/SOLR-15301
>             Project: Solr
>          Issue Type: Improvement
>          Components: metrics
>            Reporter: Andras Salamon
>            Assignee: Andras Salamon
>            Priority: Minor
>             Fix For: main (9.0)
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> During metrics calculation Solr asks for core indexSize three times. Twice in 
> SolrCore and once in ReplicationHandler. It slows down metrics calculation 
> and it is also possible that these three reported values are not exactly the 
> same if size changes during calculation.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to