Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-8890

Parallel Iteration of Lists

Details

    • Task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 9.0, 8.2
    • None
    • New

    Description

      Solr/contrib/analysis-extras contains the class `BooleanWeight`, which maintains two lists that are repeatedly iterated over in parallel. While both lists do have the same length, this is not immediately obvious from the locations the iterate them. A future change may lead to the lists getting our of sync, which would break the iterations. Moreover, there is no established language feature for iterating two lists, which is why the iteration is implemented differently in various locations throughout the class.

      I created a patch that joins the two lists into one, which simplifies the iteration, unifies the implementation in all places, and prevents that the two lists get out of sync without becoming aware of the parallel iterations.

      Attachments

        Activity

          People

            Unassigned Unassigned
            svamann Sven Amann
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 50m
                50m