Apache Lucene open-source search software
SOLR-2895: call CommitTracker#addedDocument after document is added
Simon Willnauer25731ea3f7ed
diff --git a/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java b/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.javaindex 3fa4f4da3fb..382350d4e43 100644--- a/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java+++ b/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java@@ -143,7 +143,6 @@ public class DirectUpdateHandler2 extends UpdateHandler {try {- commitTracker.addedDocument( cmd.commitWithin );softCommitTracker.addedDocument( -1 ); // TODO: support commitWithin with soft updateif (cmd.overwrite) {@@ -172,7 +171,7 @@ public class DirectUpdateHandler2 extends UpdateHandler {// allow duplicateswriter.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