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

SolrIndexSearcher.getIndexFingerprint uses dubious sunchronization

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.3
    • Fix Version/s: 6.3, 7.0
    • Component/s: None
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      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

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: