[
https://issues.apache.org/jira/browse/SOLR-2933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13160304#comment-13160304
] Mikhail Khludnev edited comment on SOLR-2933 at 11/30/11 8:31 PM: ------------------------------------------------------------------ AbstractDataImportHandlerTestCase.java-choose-map-randomly.patch pick up map class randomly in all DIH testcases. It breaks [TestCachedSqlEntityProcessor.withKeyAndLookup|http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestCachedSqlEntityProcessor.java?revision=1201659&view=markup]. More explanations are [1|https://issues.apache.org/jira/browse/SOLR-2382?focusedCommentId=13158689&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13158689] [2|https://issues.apache.org/jira/browse/SOLR-2382?focusedCommentId=13159418&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13159418] [3|https://issues.apache.org/jira/browse/SOLR-2382?focusedCommentId=13159431&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13159431] seed which reproduces the fail {code} ant test -Dtestcase=TestCachedSqlEntityProcessor -Dtestmethod=withKeyAndLookup -Dtests.seed=7735f677498f3558:-29c15941cc37921e:-32c8bd2280b92536 -Dargs="-Dfile.encoding=UTF-8" {code} Let me attach the fix tomorrow. It's not a big deal anyway. was (Author: mkhludnev): AbstractDataImportHandlerTestCase.java-choose-map-randomly.patch pick up map class randomly in all DIH testcases. It breaks [TestCachedSqlEntityProcessor.withKeyAndLookup|http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestCachedSqlEntityProcessor.java?revision=1201659&view=markup]. More explanations are [1|https://issues.apache.org/jira/browse/SOLR-2382?focusedCommentId=13158689&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13158689] [2|https://issues.apache.org/jira/browse/SOLR-2382?focusedCommentId=13159418&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13159418] [3|https://issues.apache.org/jira/browse/SOLR-2382?focusedCommentId=13159431&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13159431] Let me attach the fix tomorrow. > DIHCacheSupport ignores left side of where="xid=x.id" attribute > --------------------------------------------------------------- > > Key: SOLR-2933 > URL: https://issues.apache.org/jira/browse/SOLR-2933 > Project: Solr > Issue Type: Bug > Components: contrib - DataImportHandler > Affects Versions: 4.0 > Reporter: Mikhail Khludnev > Priority: Minor > Labels: noob, random > Attachments: > AbstractDataImportHandlerTestCase.java-choose-map-randomly.patch > > Original Estimate: 1h > Remaining Estimate: 1h > > DIHCacheSupport introduced at SOLR-2382 uses new config attributes cachePk > and cacheLookup. But support old one where="xid=x.id" is broken by > [DIHCacheSupport.<init>|http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DIHCacheSupport.java?view=markup] > - it never put where="" sides into the context, but it revealed by > [SortedMapBackedCache.<init>|http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/SortedMapBackedCache.java?view=markup], > which takes just first column as a primary key. That's why all tests are > green. > To reproduce the issue I need just reorder entry at [line > 219|http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestCachedSqlEntityProcessor.java?revision=1201659&view=markup] > and make desc first and picked up as a primary key. > To do that I propose to chose concrete map class randomly for all DIH test > cases at > [createMap()|http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTestCase.java?revision=1149600&view=markup]. > > I'm attaching test breaking patch and seed. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
