lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject lucene-solr:master: SOLR-11911: Check for thread interrupted and stop looping.
Date Mon, 19 Mar 2018 13:53:10 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/master fa03a3843 -> 9980f05ac


SOLR-11911: Check for thread interrupted and stop looping.


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

Branch: refs/heads/master
Commit: 9980f05ac3830d9202be9e8a8e4f7e7cabfcb55c
Parents: fa03a38
Author: Andrzej Bialecki <ab@apache.org>
Authored: Mon Mar 19 14:52:18 2018 +0100
Committer: Andrzej Bialecki <ab@apache.org>
Committed: Mon Mar 19 14:52:18 2018 +0100

----------------------------------------------------------------------
 .../org/apache/solr/cloud/autoscaling/ComputePlanAction.java     | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9980f05a/solr/core/src/java/org/apache/solr/cloud/autoscaling/ComputePlanAction.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/autoscaling/ComputePlanAction.java b/solr/core/src/java/org/apache/solr/cloud/autoscaling/ComputePlanAction.java
index 3f58919..dc3cfd5 100644
--- a/solr/core/src/java/org/apache/solr/cloud/autoscaling/ComputePlanAction.java
+++ b/solr/core/src/java/org/apache/solr/cloud/autoscaling/ComputePlanAction.java
@@ -95,6 +95,10 @@ public class ComputePlanAction extends TriggerActionBase {
           opLimit = requestedOperations;
         }
         do {
+          // computing changes in large clusters may take a long time
+          if (Thread.currentThread().isInterrupted()) {
+            throw new InterruptedException("stopping - thread was interrupted");
+          }
           SolrRequest operation = suggester.getSuggestion();
           opCount++;
           // prepare suggester for the next iteration


Mime
View raw message