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

ConcurrentModificationException when calling org.apache.solr.core.SolrInfoBean.getMetricsSnapshot

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 7.1
    • 7.3
    • metrics

    Description

      SOLR-11255 Updated to use  ConcurrentHashMap.newKeySet(); for all metricNames implementation but missed a few classes.

      I see this exception happening once in a while:

      Cause0: java.util.ConcurrentModificationException Cause0-StackTrace: at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1558) at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) at org.apache.solr.util.stats.MetricUtils.convertMetrics(MetricUtils.java:248) at org.apache.solr.util.stats.MetricUtils.convertMetrics(MetricUtils.java:226) at org.apache.solr.core.SolrInfoBean.getMetricsSnapshot(SolrInfoBean.java:62)

       

      Three classes weren't updated from using a HashSet for metricNames: FastLRUCache, LFUCache and LRUCache

      Attachments

        1. SOLR-11898.patch
          3 kB
          Erick Erickson

        Issue Links

          Activity

            People

              erickerickson Erick Erickson
              millerjeff0 Jeff Miller
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0.5h
                  0.5h
                  Remaining:
                  Time Spent - 10m Remaining Estimate - 20m
                  20m
                  Logged:
                  Time Spent - 10m Remaining Estimate - 20m
                  10m