Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-14274

Multiple CoreContainers will register the same JVM Metrics

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 8.6, 9.0
    • None
    • None

    Description

      When running multiple CoreContainer in the same JVM, either because we called SolrCloudTestCase.configureCluster(int n) with n > 1 or because we have multiple tests running in the same JVM in succession, we will have contention on the shared JVM metricsRegistry as they each replace the existing metrics with their own. Further, with multiple nodes at the same time, some of these metrics will be incorrect anyway, since they will only reflect a single core container. Others will be fine since I think they are reading system-level information so it doesn't matter where it comes from.

      I think this is a test-only issue, since the circumstances where somebody is running multiple core containers in a single JVM in production should be rare, but maybe there are edge cases affected with EmbeddedSolrServer and MapReduce or Spark, or other unusual deployment patterns.

      Removing the metrics registration entirely can speed up configureCluster(100).build() on my machine from 2 minutes to 30 seconds, so I'm optimistic that there can be gains here without sacrificing the feature entirely.

      Attachments

        Issue Links

          Activity

            People

              mdrob Mike Drob
              mdrob Mike Drob
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m