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 2020/05/08 05:03:14 UTC
[lucene-solr] branch master updated: LUCENE-9363: Only assert for
no merging segments we merges are disabled
This is an automated email from the ASF dual-hosted git repository.
simonw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/master by this push:
new 30ba8de LUCENE-9363: Only assert for no merging segments we merges are disabled
30ba8de is described below
commit 30ba8de40af7d76b910aebf62263c890173dec45
Author: Simon Willnauer <si...@apache.org>
AuthorDate: Fri May 8 06:58:37 2020 +0200
LUCENE-9363: Only assert for no merging segments we merges are disabled
---
lucene/core/src/java/org/apache/lucene/index/IndexWriter.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
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 464be01..52adbef 100644
--- a/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
+++ b/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
@@ -2260,6 +2260,7 @@ public class IndexWriter implements Closeable, TwoPhaseCommit, Accountable,
// changes concurrently, abortMerges is synced as well
stopMerges = true; // this disables merges forever
abortMerges();
+ assert mergingSegments.isEmpty() : "we aborted all merges but still have merging segments: " + mergingSegments;
}
if (infoStream.isEnabled("IW")) {
infoStream.message("IW", "rollback: done finish merges");
@@ -2494,8 +2495,6 @@ public class IndexWriter implements Closeable, TwoPhaseCommit, Accountable,
}
notifyAll();
- assert 0 == mergingSegments.size();
-
if (infoStream.isEnabled("IW")) {
infoStream.message("IW", "all running merges have aborted");
}