[ https://issues.apache.org/jira/browse/SOLR-2895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149892#comment-13149892 ]
Simon Willnauer commented on SOLR-2895: --------------------------------------- I don't see how this test can ever be reliable. We call commitTracker.addedDocument( cmd.commitWithin ); before the document is passed to the IndexWriter... no surprise this fails all the time. Its kind of weird that we call addedDocument (past tense) before it actually happened. I think we should do that once we added the document not before. then this test should work just fine {code} Index: solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java =================================================================== --- solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java (revision 1201867) +++ solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java (working copy) @@ -143,7 +143,6 @@ try { - commitTracker.addedDocument( cmd.commitWithin ); softCommitTracker.addedDocument( -1 ); // TODO: support commitWithin with soft update if (cmd.overwrite) { @@ -172,7 +171,7 @@ // allow duplicates writer.addDocument(cmd.getLuceneDocument()); } - + commitTracker.addedDocument( cmd.commitWithin ); // Add to the transaction log *after* successfully adding to the index, if there was no error. // This ordering ensures that if we log it, it's definitely been added to the the index. // This also ensures that if a commit sneaks in-between, that we know everything in a particular {code} btw. this could fail on 3.x as well we do the same thing there basically. > AutoCommitTest.maxDocs fails intermittently on trunk > ---------------------------------------------------- > > Key: SOLR-2895 > URL: https://issues.apache.org/jira/browse/SOLR-2895 > Project: Solr > Issue Type: Bug > Affects Versions: 4.0 > Environment: Mac OS X > java version "1.6.0_26" > Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425) > Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode) > Trunk 1201462 > Reporter: Erick Erickson > > ant clean test -Dtestcase=AutoCommitTest -Dtestmethod=testMaxDocs > -Dtests.seed=50ccee7e682c1673:-5043acd3fdf2c09f:123d82991d063e29 > -Dargs="-Dfile.encoding=MacRoman" > This fails for me 40% of the time or so. Also fails with -Dtests.iter. > Set tests.iter=1000 on 3x and no problem. > Don't quite know what the priority should be. -- 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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org