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

This commit is contained in:
Andrzej Bialecki 2018-03-19 14:52:18 +01:00
parent fa03a3843c
commit 9980f05ac3
1 changed files with 4 additions and 0 deletions

View File

@ -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