lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject lucene-solr:master: SOLR-11440: Not a fix. Swallowing the exception for the time being.
Date Thu, 05 Oct 2017 06:04:25 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/master 080232f3d -> 6b327fa40


SOLR-11440: Not a fix. Swallowing the exception for the time being.


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

Branch: refs/heads/master
Commit: 6b327fa4046bdae94210fb4faa76e66ebe133fb1
Parents: 080232f
Author: Noble Paul <noble@apache.org>
Authored: Thu Oct 5 16:34:13 2017 +1030
Committer: Noble Paul <noble@apache.org>
Committed: Thu Oct 5 16:34:13 2017 +1030

----------------------------------------------------------------------
 .../solr/cloud/autoscaling/ScheduledTriggers.java     | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6b327fa4/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTriggers.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTriggers.java b/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTriggers.java
index 7a96552..7bbbcd9 100644
--- a/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTriggers.java
+++ b/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTriggers.java
@@ -37,6 +37,7 @@ import java.util.concurrent.ScheduledThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicReference;
 import java.util.concurrent.locks.ReentrantLock;
 import java.util.stream.Collectors;
 
@@ -146,7 +147,18 @@ public class ScheduledTriggers implements Closeable {
     if (isClosed) {
       throw new AlreadyClosedException("ScheduledTriggers has been closed and cannot be used
anymore");
     }
-    ScheduledTrigger scheduledTrigger = new ScheduledTrigger(newTrigger, zkClient, queueStats);
+    ScheduledTrigger st = null;
+    try {
+      st = new ScheduledTrigger(newTrigger, zkClient, queueStats);
+    } catch (Exception e) {
+      //TODO to decide what to do
+      log.error("Failed to add trigger", e);
+      return;
+    }
+
+    ScheduledTrigger scheduledTrigger = st;
+
+
     ScheduledTrigger old = scheduledTriggers.putIfAbsent(newTrigger.getName(), scheduledTrigger);
     if (old != null) {
       if (old.trigger.equals(newTrigger)) {


Mime
View raw message