[ 
https://issues.apache.org/jira/browse/SOLR-13300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16788392#comment-16788392
 ] 

Hoss Man commented on SOLR-13300:
---------------------------------

Ok, so here's what's happening here..
 # When [~mkhludnev] first wrote this test as part of SOLR-5725, he explicitly 
noted in the test that there was in fact a discrepency in how 
{{facet.missing=true&facet.limit=0}} was handled between single node solr and 
distributed solr, and had the test account for this by using {{handle.put(null, 
SKIP);}} (because the facet.missing count is returned in the "facet_fields" 
response as a null key.

 # In Nov 2018, as part of his SOLR-12801 work, [[email protected]]'s 
75b183196798232aa6f2dcaaaab117f309119053 commit changed this test to just 
remove the {{handle.put(null, SKIP);}} call – evidently because he felt it was 
important to change {{BaseDistributedSearchTestCase.handle}} from a HashMap to 
a ConcurrentHashMap (which doesn't support null keys) ... although I'm not sure 
if that was something that he found was definitively causing problems in other 
tests, or just something he thought was a "good idea" and tried it.

Either way: The net result is that since then this test is no longer protecting 
itself against the possible random permutation of params that is known to be 
inconsistent and cause test failures.
----
Just attempting to re-instate the {{handle.put(null, SKIP);}} causes an NPE 
because of the use of ConcurrentHashMap.

My first thought was that the most straight forward fix would be for this 
particular test to override {{protected Map handle}} to go back to using a 
simple HashMap (since the test doesn't involve any concurrency) – but when I 
tried that the test still failed because Mark's 75b1831967 commit also 
redefined {{BaseDistributedSearchTestCase.flags}} to short circut on 'null' so 
it never even consults the {{handle}} ... i'm not sure why exactly that was a 
neccessary change given that ConcurrentHashMap will already "protect itself" 
from having a null key ... perhaps that can be rolled back?

> Reproducing seed in master for DistributedFacetExistsSmallTest
> --------------------------------------------------------------
>
>                 Key: SOLR-13300
>                 URL: https://issues.apache.org/jira/browse/SOLR-13300
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Erick Erickson
>            Priority: Major
>
> ant test -Dtestcase=DistributedFacetExistsSmallTest -Dtests.method=test 
> -Dtests.seed=662700D3AC576EAB -Dtests.slow=true -Dtests.badapples=true 
> -Dtests.locale=ca -Dtests.timezone=Europe/Ulyanovsk -Dtests.asserts=true 
> -Dtests.file.encoding=ISO-8859-1
> This test hasn't been changed lately, but reproduces 3/3 for me.
>  
> {code:java}
>    2> NOTE: reproduce with: ant test  
> -Dtestcase=DistributedFacetExistsSmallTest -Dtests.method=test 
> -Dtests.seed=662700D3AC576EAB -Dtests.slow=true -Dtests.badapples=true 
> -Dtests.locale=ca -Dtests.timezone=Europe/Ulyanovsk -Dtests.asserts=true 
> -Dtests.file.encoding=ISO-8859-1
>    [junit4] FAILURE 19.1s | DistributedFacetExistsSmallTest.test <<<
>    [junit4]    > Throwable #1: junit.framework.AssertionFailedError: 
> .facet_counts.facet_fields.t_s.null:0!=null
>    [junit4]    >      at 
> __randomizedtesting.SeedInfo.seed([662700D3AC576EAB:EE733F0902AB0353]:0)
>    [junit4]    >      at junit.framework.Assert.fail(Assert.java:57)
>    [junit4]    >      at 
> org.apache.solr.BaseDistributedSearchTestCase.compareSolrResponses(BaseDistributedSearchTestCase.java:999)
>    [junit4]    >      at 
> org.apache.solr.BaseDistributedSearchTestCase.compareResponses(BaseDistributedSearchTestCase.java:1026)
>    [junit4]    >      at 
> org.apache.solr.BaseDistributedSearchTestCase.query(BaseDistributedSearchTestCase.java:680)
>    [junit4]    >      at 
> org.apache.solr.BaseDistributedSearchTestCase.query(BaseDistributedSearchTestCase.java:643)
>    [junit4]    >      at 
> org.apache.solr.handler.component.DistributedFacetExistsSmallTest.checkRandomParams(DistributedFacetExistsSmallTest.java:139)
>    [junit4]    >      at 
> org.apache.solr.handler.component.DistributedFacetExistsSmallTest.test(DistributedFacetExistsSmallTest.java:87)
>    [junit4]    >      at 
> org.apache.solr.BaseDistributedSearchTestCase$ShardsRepeatRule$ShardsFixedStatement.callStatement(BaseDistributedSearchTestCase.java:1082)
>    [junit4]    >      at 
> org.apache.solr.BaseDistributedSearchTestCase$ShardsRepeatRule$ShardsStatement.evaluate(BaseDistributedSearchTestCase.java:1054)
>    [junit4]    >      at java.lang.Thread.run(Thread.java:748)
>    [junit4]   2> NOTE: leaving temporary files on disk at: 
> /Users/Erick/apache/solrVersions/playspace/solr/build/solr-core/test/J0/temp/solr.handler.component.DistributedFacetExistsSmallTest_662700D3AC576EAB-001
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to