You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by si...@apache.org on 2018/03/31 12:26:06 UTC

lucene-solr:branch_7x: LUCENE-8232: Write and Checkpoint DV updates seperately if we drop a reader

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x d47931c4b -> d7486a57b


LUCENE-8232: Write and Checkpoint DV updates seperately if we drop a reader


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/d7486a57
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/d7486a57
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/d7486a57

Branch: refs/heads/branch_7x
Commit: d7486a57b155345a0aa0050adc4bcd40e3e4252c
Parents: d47931c
Author: Simon Willnauer <si...@apache.org>
Authored: Sat Mar 31 14:24:36 2018 +0200
Committer: Simon Willnauer <si...@apache.org>
Committed: Sat Mar 31 14:25:47 2018 +0200

----------------------------------------------------------------------
 .../core/src/java/org/apache/lucene/index/IndexWriter.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d7486a57/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java b/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
index 665ccfb..9cd1314 100644
--- a/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
+++ b/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
@@ -604,10 +604,7 @@ public class IndexWriter implements Closeable, TwoPhaseCommit, Accountable {
         if (!poolReaders && rld.refCount() == 1 && readerMap.containsKey(rld.info)) {
           // This is the last ref to this RLD, and we're not
           // pooling, so remove it:
-          boolean changed = rld.writeLiveDocs(directory);
-          changed |= rld.writeFieldUpdates(directory, globalFieldNumberMap, bufferedUpdatesStream.getCompletedDelGen(), infoStream);
-
-          if (changed) {
+          if (rld.writeLiveDocs(directory)) {
             // Make sure we only write del docs for a live segment:
             assert assertInfoLive == false || assertInfoIsLive(rld.info);
             // Must checkpoint because we just
@@ -619,6 +616,9 @@ public class IndexWriter implements Closeable, TwoPhaseCommit, Accountable {
             // did was move the state to disk:
             checkpointNoSIS();
           }
+          if (rld.writeFieldUpdates(directory, globalFieldNumberMap, bufferedUpdatesStream.getCompletedDelGen(), infoStream)) {
+            checkpointNoSIS();
+          }
           if (rld.getNumDVUpdates() == 0) {
             rld.dropReaders();
             readerMap.remove(rld.info);