You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2021/03/29 12:48:12 UTC

[GitHub] [solr] asalamon74 opened a new pull request #53: CDPD-24223 Eliminate repetitive index size calculation for Solr metrics

asalamon74 opened a new pull request #53:
URL: https://github.com/apache/solr/pull/53


   Change-Id: I1138df4f20d16e365e180e9093d040a283ff6174
   
   <!--
   _(If you are a project committer then you may remove some/all of the following template.)_
   
   Before creating a pull request, please file an issue in the ASF Jira system for Solr:
   
   * https://issues.apache.org/jira/projects/SOLR
   
   You will need to create an account in Jira in order to create an issue.
   
   The title of the PR should reference the Jira issue number in the form:
   
   * SOLR-####: <short description of problem or changes>
   
   SOLR must be fully capitalized. A short description helps people scanning pull requests for items they can work on.
   
   Properly referencing the issue in the title ensures that Jira is correctly updated with code review comments and commits. -->
   
   
   # Description
   
   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.
   
   # Solution
   
   Caching the size, so we only calculate it once.
   
   # Tests
   
   Unit tests.
   
   Metrics calls.
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [x] I have reviewed the guidelines for [How to Contribute](https://wiki.apache.org/solr/HowToContribute) and my code conforms to the standards described there to the best of my ability.
   - [x] I have created a Jira issue and added the issue ID to my pull request title.
   - [x] I have given Solr maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended)
   - [x] I have developed this patch against the `main` branch.
   - [x] I have run `./gradlew check`.
   - [ ] I have added tests for my changes.
   - [ ] I have added documentation for the [Reference Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [solr] asalamon74 commented on pull request #53: SOLR-15301 Eliminate repetitive index size calculation for Solr metrics

Posted by GitBox <gi...@apache.org>.
asalamon74 commented on pull request #53:
URL: https://github.com/apache/solr/pull/53#issuecomment-931309891


   Committed: 36f5e4155dd2327416b9c0519e8d5ff48781fce7


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [solr] madrob commented on pull request #53: CDPD-24223 Eliminate repetitive index size calculation for Solr metrics

Posted by GitBox <gi...@apache.org>.
madrob commented on pull request #53:
URL: https://github.com/apache/solr/pull/53#issuecomment-860826448


   @asalamon74 can you file a SOLR JIRA issue for this? It looks like this is based on some other internal tracker.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [solr] asalamon74 closed pull request #53: SOLR-15301 Eliminate repetitive index size calculation for Solr metrics

Posted by GitBox <gi...@apache.org>.
asalamon74 closed pull request #53:
URL: https://github.com/apache/solr/pull/53


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [solr] asalamon74 commented on pull request #53: SOLR-15301 Eliminate repetitive index size calculation for Solr metrics

Posted by GitBox <gi...@apache.org>.
asalamon74 commented on pull request #53:
URL: https://github.com/apache/solr/pull/53#issuecomment-899451944


   I rebased this pull request to solves some conflicts.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [solr] markrmiller commented on pull request #53: SOLR-15301 Eliminate repetitive index size calculation for Solr metrics

Posted by GitBox <gi...@apache.org>.
markrmiller commented on pull request #53:
URL: https://github.com/apache/solr/pull/53#issuecomment-932677247


   Nice, this can be a very expensive call and there is no real limit on how often metrics may be generated - in a jmx case it was the case and may still be that for every metric in a group added in a loop, every metrics in that group was asked to generate.
   
   However, I do wonder about the one off implementation and refresh control.
   
   Almost every metric that exists with more than counter type costs could benefit from some kind of caching. Time based caching seems like the most predicable and non surprising approach to limiting frequency and controlling stale value expectations.
   
   There is a caching metric implementation that simply wraps a metric and I believe takes a time parameter for how long to cache it. Why not use that here?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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