[ 
https://issues.apache.org/jira/browse/SOLR-10874?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Steve Rowe updated SOLR-10874:
------------------------------
    Attachment: SOLR-10874.patch

Patch, incorporate's [~makos...@me.com]'s patch and adds a new test.

This new test does not use debug=true, but nevertheless hits the same 
assertions that Michael referred to in earlier comments.  When I disable 
assertions, I get an AIOOBE with the new test when excluding the fix - example 
below. (I'll change the issue title to reflect this in a sec.)

{noformat}
   [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestFunctionQuery 
-Dtests.method=testRetrievePayloads -Dtests.seed=D873D8C5E5E58072 
-Dtests.slow=true -Dtests.locale=ro -Dtests.timezone=ACT -Dtests.asserts=false 
-Dtests.file.encoding=UTF-8
   [junit4] ERROR   1.80s | TestFunctionQuery.testRetrievePayloads <<<
   [junit4]    > Throwable #1: java.lang.ArrayIndexOutOfBoundsException: -127
   [junit4]    >        at 
__randomizedtesting.SeedInfo.seed([D873D8C5E5E58072:3CF2F76AD396D173]:0)
   [junit4]    >        at 
org.apache.lucene.codecs.lucene50.ForUtil.readBlock(ForUtil.java:196)
   [junit4]    >        at 
org.apache.lucene.codecs.lucene50.Lucene50PostingsReader$EverythingEnum.refillPositions(Lucene50PostingsReader.java:1024)
   [junit4]    >        at 
org.apache.lucene.codecs.lucene50.Lucene50PostingsReader$EverythingEnum.nextPosition(Lucene50PostingsReader.java:1226)
   [junit4]    >        at 
org.apache.solr.search.FloatPayloadValueSource$1.floatVal(FloatPayloadValueSource.java:161)
   [junit4]    >        at 
org.apache.lucene.queries.function.docvalues.FloatDocValues.doubleVal(FloatDocValues.java:62)
   [junit4]    >        at 
org.apache.lucene.queries.function.ValueSource$ValueSourceComparator.compareBottom(ValueSource.java:392)
   [junit4]    >        at 
org.apache.lucene.search.TopFieldCollector$SimpleFieldCollector$1.collect(TopFieldCollector.java:117)
   [junit4]    >        at 
org.apache.lucene.search.MatchAllDocsQuery$1$1.score(MatchAllDocsQuery.java:56)
   [junit4]    >        at 
org.apache.lucene.search.BulkScorer.score(BulkScorer.java:39)
   [junit4]    >        at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:658)
   [junit4]    >        at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:462)
   [junit4]    >        at 
org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:215)
   [junit4]    >        at 
org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1591)
   [junit4]    >        at 
org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1408)
   [junit4]    >        at 
org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:575)
   [junit4]    >        at 
org.apache.solr.handler.component.QueryComponent.doProcessUngroupedSearch(QueryComponent.java:1435)
   [junit4]    >        at 
org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:375)
   [junit4]    >        at 
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:295)
   [junit4]    >        at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:177)
   [junit4]    >        at 
org.apache.solr.core.SolrCore.execute(SolrCore.java:2484)
   [junit4]    >        at 
org.apache.solr.util.TestHarness.query(TestHarness.java:337)
   [junit4]    >        at 
org.apache.solr.util.TestHarness.query(TestHarness.java:319)
   [junit4]    >        at 
org.apache.solr.SolrTestCaseJ4.assertJQ(SolrTestCaseJ4.java:951)
   [junit4]    >        at 
org.apache.solr.SolrTestCaseJ4.assertJQ(SolrTestCaseJ4.java:920)
   [junit4]    >        at 
org.apache.solr.search.function.TestFunctionQuery.testRetrievePayloads(TestFunctionQuery.java:528)
{noformat}

> FloatPayloadValueSource throws assertion error if debug=true
> ------------------------------------------------------------
>
>                 Key: SOLR-10874
>                 URL: https://issues.apache.org/jira/browse/SOLR-10874
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: search
>    Affects Versions: 6.6
>            Reporter: Michael Kosten
>            Assignee: Erik Hatcher
>            Priority: Minor
>         Attachments: SOLR-10874.patch, SOLR-10874.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> Using the new payload function will fail with an assertion error if the debug 
> parameter is included in the query. This is caused by the floatValue method 
> in FloatPayloadValueSource being called for the same doc id twice in a row.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to