SOLR-7281: Improve 'best effort', we don't want this best effort method to easily throw exceptions.

This commit is contained in:
markrmiller 2016-02-10 10:27:43 -05:00
parent 24f4025dc1
commit 0417cc41dc
1 changed files with 4 additions and 11 deletions

View File

@ -2511,18 +2511,11 @@ public final class ZkController {
ZkStateReader.NODE_NAME_PROP, nodeName);
try {
Overseer.getInQueue(getZkClient()).offer(Utils.toJSON(m));
} catch (KeeperException e) {
log.info("Could not publish node as down: " + e.getMessage());
} catch (RuntimeException e) {
Throwable rootCause = SolrException.getRootCause(e);
if (rootCause instanceof KeeperException) {
log.info("Could not publish node as down: " + e.getMessage());
} else {
throw e;
}
} catch (InterruptedException e) {
Thread.interrupted();
log.info("", e);
}
log.info("Publish node as down was interrupted.");
} catch (Exception e) {
log.info("Could not publish node as down: " + e.getMessage());
}
}
}