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

A couple of small improvements to UnInvertedField class.

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 4.10, 6.0
    • Component/s: search
    • Labels:
      None

      Description

      Looks like UnInvertedField#getUnInvertedField has implemented a bit additional synchronization module rather than what is required, and thereby increasing the complexity.

      https://github.com/apache/lucene-solr/blob/trunk/solr/core/src/java/org/apache/solr/request/UnInvertedField.java#L667

      As pointed out in the above link, as the synchronization is performed on the cache variable(which itself will protect the threads from obtaining access to the cache), we can safely remove all the placeholder flags. As long as cache.get() is in synchronized block, we can simply populate the cache with new entries and other threads will be able to see the changes.

      This change has been introduced in https://issues.apache.org/jira/browse/SOLR-2548 (Multithreaded faceting)

        Attachments

        1. SOLR-6252.patch
          3 kB
          Vamsee Yarlagadda
        2. SOLR-6252v2.patch
          3 kB
          Vamsee Yarlagadda
        3. SOLR-6252-v3.patch
          2 kB
          Vamsee Yarlagadda
        4. solr-uninvertedfield-cache.patch
          6 kB
          Avishai Ish-Shalom

          Issue Links

            Activity

              People

              • Assignee:
                markrmiller@gmail.com Mark Miller
                Reporter:
                vamsee Vamsee Yarlagadda
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: