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

SolrIndexSearcher.getIndexFingerprint uses dubious sunchronization

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 6.3
    • 6.3, 7.0
    • None
    • None

    Description

      In SOLR-9310 we added more code that does some fingerprint caching in SolrIndexSearcher. However, the synchronization looks like it could be made more efficient and may have issues with correctness.

      https://github.com/apache/lucene-solr/blob/branch_6x/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java#L2371-L2385

      Some of the issues:

      • Double checked locking needs use of volatile variables to ensure proper memory semantics.
      • sync on a ConcurrentHashMap is usually a code smell

      Attachments

        1. SOLR-9524.patch
          2 kB
          Mike Drob

        Issue Links

          Activity

            People

              noble.paul Noble Paul
              mdrob Mike Drob
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: