lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Wang (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LUCENE-7002) MultiCollector throws NPE when there is CollectTerminatedException is thrown by a subcollector
Date Fri, 29 Jan 2016 16:46:39 GMT
John Wang created LUCENE-7002:
---------------------------------

             Summary: MultiCollector throws NPE when there is CollectTerminatedException is
thrown by a subcollector
                 Key: LUCENE-7002
                 URL: https://issues.apache.org/jira/browse/LUCENE-7002
             Project: Lucene - Core
          Issue Type: Bug
          Components: core/search
    Affects Versions: 5.4
            Reporter: John Wang


I am seeing this in our log:

{noformat}
Caused by: java.lang.NullPointerException
        at org.apache.lucene.search.MultiCollector$MultiLeafCollector.setScorer(MultiCollector.java:156)
        at org.apache.lucene.search.BooleanScorer$1$1.setScorer(BooleanScorer.java:50)
        at org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:166)
        at org.apache.lucene.search.BooleanScorer$1.score(BooleanScorer.java:59)
        at org.apache.lucene.search.BooleanScorer$BulkScorerAndDoc.score(BooleanScorer.java:90)
        at org.apache.lucene.search.BooleanScorer.scoreWindowSingleScorer(BooleanScorer.java:313)
        at org.apache.lucene.search.BooleanScorer.scoreWindow(BooleanScorer.java:336)
        at org.apache.lucene.search.BooleanScorer.score(BooleanScorer.java:364)
        at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:39)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:821)
        at org.apache.lucene.search.IndexSearcher$5.call(IndexSearcher.java:763)
        at org.apache.lucene.search.IndexSearcher$5.call(IndexSearcher.java:760)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
{noformat}

Looks like 
{noformat}
MultiCollector.removeCollector(i)
{noformat} 
is called on line 176, the loop:
{noformat}
for (LeafCollector c : collectors) {
        c.setScorer(scorer);
}
{noformat}
in setScorer can still step on it, on line 155.

I am however, unable to reproduce that with a unit test.

I made a copy of this class and added a null check in setScorer() and the problem goes away.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message