From 67478264b523498674b1add04ab39b7c41693b50 Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Tue, 15 Nov 2011 21:26:54 +0000 Subject: [PATCH] SOLR-2895: call commit tracker after doc is added git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1202428 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/solr/update/DirectUpdateHandler2.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java b/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java index 382350d4e43..9b1515ed93a 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 { - softCommitTracker.addedDocument( -1 ); // TODO: support commitWithin with soft update if (cmd.overwrite) { Term updateTerm; @@ -171,13 +170,15 @@ public class DirectUpdateHandler2 extends UpdateHandler { // 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) {