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

Andras Salamon commented on SOLR-15301:
---------------------------------------

I uploaded a new pull request with and amend commit: 
[https://github.com/apache/solr/pull/326] 

I followed the suggestion of [~dsmiley] and replaced my ThreadLocal solution 
with SolrRequestInfo, I hope I'm using that class in the correct way.

I don't thing cachedGauge is useful in my original problem because we have 
three different gauges here (in two different classes). I also tested a simpler 
timestamp based cache in SolrCore to store the index size. I used the " twice 
the time it takes to calculate the index size, with some pre-defined minimum (a 
second)" which was working great when I had one collection. But when I created 
three collections and tested a fake slow index calculation it recalculated the 
same index size multiple times. And I don't think that we could use the 
collection number in the deadline calculation.

> 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: 50m
>  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