SOLR-5569: fix how this check is done - we need to hit the rest of the loop, not continue

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1553072 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2013-12-23 05:45:28 +00:00
parent 07a07a5bd1
commit 8d9d344501
1 changed files with 4 additions and 4 deletions

View File

@ -909,10 +909,10 @@ public class CoreAdminHandler extends RequestHandlerBase {
live = clusterState.liveNodesContain(nodeName); live = clusterState.liveNodesContain(nodeName);
String localState = cloudDescriptor.getLastPublished(); String localState = cloudDescriptor.getLastPublished();
if (onlyIfLeaderActive != null && onlyIfLeaderActive && (localState == null || !localState.equals(ZkStateReader.ACTIVE))) {
continue; boolean onlyIfActiveCheckResult = onlyIfLeaderActive != null && onlyIfLeaderActive && (localState == null || !localState.equals(ZkStateReader.ACTIVE));
}
if (nodeProps != null && state.equals(waitForState)) { if (!onlyIfActiveCheckResult && nodeProps != null && state.equals(waitForState)) {
if (checkLive == null) { if (checkLive == null) {
break; break;
} else if (checkLive && live) { } else if (checkLive && live) {