You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2018/04/02 07:38:13 UTC
[26/34] lucene-solr:jira/solr-12095: LUCENE-8232: Write and
Checkpoint DV updates seperately if we drop a reader
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/ca02e637
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/ca02e637
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/ca02e637
Branch: refs/heads/jira/solr-12095
Commit: ca02e637ffa117084dc8c59ff32ad487599aae77
Parents: acb3c37
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:24:36 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/ca02e637/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 3791e19..2e14166 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);