mirror of https://github.com/apache/lucene.git
SOLR-10995: Improve ChaosMonkey logic to find Jetty running leader node
This commit is contained in:
parent
077e8b1da4
commit
6a55def1ea
|
@ -418,11 +418,7 @@ public class ChaosMonkey {
|
||||||
CoreContainer cc = cjetty.jetty.getCoreContainer();
|
CoreContainer cc = cjetty.jetty.getCoreContainer();
|
||||||
if (cc != null) {
|
if (cc != null) {
|
||||||
try (SolrCore core = cc.getCore(leader.getStr(ZkStateReader.CORE_NAME_PROP))) {
|
try (SolrCore core = cc.getCore(leader.getStr(ZkStateReader.CORE_NAME_PROP))) {
|
||||||
if (core == null) {
|
rtIsLeader = core != null && core.getCoreDescriptor().getCloudDescriptor().isLeader();
|
||||||
monkeyLog("selected jetty not running correctly - skip");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
rtIsLeader = core.getCoreDescriptor().getCloudDescriptor().isLeader();
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue