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

SolrMetricManager.overridableRegistryName should be removed; it doesn't work

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.1
    • Fix Version/s: 8.0
    • Component/s: metrics
    • Labels:
      None

      Description

      The SolrMetricManager.overridableRegistryName() method is a great idea but unfortunately in practice I've found it doesn't really work; it seems fundamentally flawed. I wish it could work. The main issue I think is that the callers of SMM.registerGauge/registerMetric assumes it can place a gauge/metric and have it be the only once there (force==true). But it won't be if it's shared.

      Another problem is in at least one of the reporters – JmxMetricsReporter.JmxListener#registerMBean will get in a race condition to remove an already-registered MBean but in the process of removing it, it'll already get removed concurrently by some other core working on the same name. This results in javax.management.InstanceNotFoundException logged as a warning; nothing serious. But I suspect conceptually there is a problem since which MBean should "win"? Shrug.

        Attachments

        1. SOLR-12652.patch
          15 kB
          Peter Somogyi
        2. SOLR-12652.patch
          15 kB
          Peter Somogyi

          Issue Links

            Activity

              People

              • Assignee:
                dsmiley David Smiley
                Reporter:
                dsmiley David Smiley
              • 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 - 0.5h
                  0.5h