You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/07/18 21:50:36 UTC

[lucene-solr] 02/04: @232 - Try popping up Overseer poll time and pause if unexpected exceptions are hit.

This is an automated email from the ASF dual-hosted git repository.

markrmiller pushed a commit to branch reference_impl
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 95ea6890cb7f3b097a6c96b01c8951b44d1ae7e1
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Sat Jul 18 16:45:23 2020 -0500

    @232 - Try popping up Overseer poll time and pause if unexpected exceptions are hit.
---
 solr/core/src/java/org/apache/solr/cloud/Overseer.java | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/cloud/Overseer.java b/solr/core/src/java/org/apache/solr/cloud/Overseer.java
index 187ef8a..4cfa32f 100644
--- a/solr/core/src/java/org/apache/solr/cloud/Overseer.java
+++ b/solr/core/src/java/org/apache/solr/cloud/Overseer.java
@@ -317,9 +317,9 @@ public class Overseer implements SolrCloseable {
           LinkedList<Pair<String, byte[]>> queue = null;
           try {
             // We do not need to filter any nodes here cause all processed nodes are removed once we flush clusterstate
-            queue = new LinkedList<>(stateUpdateQueue.peekElements(1000, 3000L, (x) -> true));
+            queue = new LinkedList<>(stateUpdateQueue.peekElements(1000, 10000L, (x) -> true));
           } catch (InterruptedException | AlreadyClosedException e) {
-            Thread.currentThread().interrupt();
+            ParWork.propegateInterrupt(e);
             return;
           } catch (KeeperException.SessionExpiredException e) {
             log.error("run()", e);
@@ -328,6 +328,12 @@ public class Overseer implements SolrCloseable {
             return;
           } catch (Exception e) {
             log.error("Unexpected error in Overseer state update loop", e);
+            try {
+              Thread.sleep(1000);
+            } catch (InterruptedException interruptedException) {
+              ParWork.propegateInterrupt(e);
+              return;
+            }
             continue;
           }
           try {
@@ -367,6 +373,12 @@ public class Overseer implements SolrCloseable {
             return;
           } catch (Exception e) {
             log.error("Unexpected error in Overseer state update loop", e);
+            try {
+              Thread.sleep(1000);
+            } catch (InterruptedException interruptedException) {
+              ParWork.propegateInterrupt(e);
+              return;
+            }
             continue;
           }
         }