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

SolrJmxReporter broken on core reload

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 6.6, 6.7, 7.0, 8.0
    • 6.6.1, 7.0, 7.1, 8.0
    • metrics
    • None

    Description

      SolrJmxReporter uses Dropwizard's JmxReporter, which in turn uses a MetricRegistry listener to report newly added metrics as MBeans, and to unregister them from MBeanServer when the reporter is closed, which happens when core is closed.

      The metrics API keeps around existing metrics in solr.core.* registries to help maintain continuous metrics in presence of core reloads. However, this means that some of these metric instances are not registered anew when a core is reloaded - and for these metrics the listener won't fire, so the MBeans won't be registered.

      This limitation is a result of the use of MetricRegistryListener in JmxReporter and can't be fixed without reimplementing this class. Another possible approach would be to configure the JmxReporter to use a "mirroring" registry instead, which will be populated with existing metrics from the original registry (thus generating "metric added" events) and then kept in sync with the main registry via a listener.

      Attachments

        1. SOLR-11221.patch
          36 kB
          Andrzej Bialecki

        Activity

          People

            ab Andrzej Bialecki
            ab Andrzej Bialecki
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: