SOLR-10995: Improve ChaosMonkey logic to find Jetty running leader node

This commit is contained in:
Tomas Fernandez Lobbe 2018-01-09 22:58:22 -08:00
parent 077e8b1da4
commit 6a55def1ea
1 changed files with 1 additions and 5 deletions

View File

@ -418,11 +418,7 @@ public class ChaosMonkey {
CoreContainer cc = cjetty.jetty.getCoreContainer();
if (cc != null) {
try (SolrCore core = cc.getCore(leader.getStr(ZkStateReader.CORE_NAME_PROP))) {
if (core == null) {
monkeyLog("selected jetty not running correctly - skip");
return null;
}
rtIsLeader = core.getCoreDescriptor().getCloudDescriptor().isLeader();
rtIsLeader = core != null && core.getCoreDescriptor().getCloudDescriptor().isLeader();
}
} else {
return null;