You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Sven Amann (JIRA)" <ji...@apache.org> on 2018/09/05 11:39:00 UTC

[jira] [Created] (SOLR-12736) Parallel Iteration of Lists

Sven Amann created SOLR-12736:
---------------------------------

             Summary: Parallel Iteration of Lists
                 Key: SOLR-12736
                 URL: https://issues.apache.org/jira/browse/SOLR-12736
             Project: Solr
          Issue Type: Task
      Security Level: Public (Default Security Level. Issues are Public)
    Affects Versions: master (8.0)
            Reporter: Sven Amann


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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org