Skip to content

Apache Lucene open-source search software

SOLR-2565: same as the addDoc bug, deletes are not triggering soft commits if hard auto commit by time is also configured

Mark Robert Millera05f774573e1
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 a37acfa3b69..d28cc7ad7b1 100644
--- a/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java
+++ b/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java
@@ -187,7 +187,9 @@ public class DirectUpdateHandler2 extends UpdateHandler {
if (commitTracker.getTimeUpperBound() > 0) {
commitTracker.scheduleCommitWithin(commitTracker.getTimeUpperBound());
- } else if (softCommitTracker.getTimeUpperBound() > 0) {
+ }
+
+ if (softCommitTracker.getTimeUpperBound() > 0) {
softCommitTracker.scheduleCommitWithin(softCommitTracker.getTimeUpperBound());
}
}
@@ -219,7 +221,9 @@ public class DirectUpdateHandler2 extends UpdateHandler {
if (commitTracker.getTimeUpperBound() > 0) {
commitTracker.scheduleCommitWithin(commitTracker.getTimeUpperBound());
- } else if (softCommitTracker.getTimeUpperBound()> 0) {
+ }
+
+ if (softCommitTracker.getTimeUpperBound()> 0) {
softCommitTracker.scheduleCommitWithin(softCommitTracker.getTimeUpperBound());
}