You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by yo...@apache.org on 2011/11/15 22:26:55 UTC
svn commit: r1202428 -
/lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java
Author: yonik
Date: Tue Nov 15 21:26:54 2011
New Revision: 1202428
URL: http://svn.apache.org/viewvc?rev=1202428&view=rev
Log:
SOLR-2895: call commit tracker after doc is added
Modified:
lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java
Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java?rev=1202428&r1=1202427&r2=1202428&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java Tue Nov 15 21:26:54 2011
@@ -143,7 +143,6 @@ public class DirectUpdateHandler2 extend
try {
- softCommitTracker.addedDocument( -1 ); // TODO: support commitWithin with soft update
if (cmd.overwrite) {
Term updateTerm;
@@ -171,13 +170,15 @@ public class DirectUpdateHandler2 extend
// 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
// log version was definitely committed.
ulog.add(cmd);
+ softCommitTracker.addedDocument( -1 ); // TODO: support commitWithin with soft update
+ commitTracker.addedDocument( cmd.commitWithin );
+
rc = 1;
} finally {
if (rc!=1) {