Clarify cluster state local node validation
This commit is contained in:
parent
cffc315dca
commit
7cdd647d7b
|
@ -404,7 +404,7 @@ public class PublishClusterStateAction extends AbstractComponent {
|
||||||
|
|
||||||
if (currentNodes.getLocalNode().equals(incomingState.nodes().getLocalNode()) == false) {
|
if (currentNodes.getLocalNode().equals(incomingState.nodes().getLocalNode()) == false) {
|
||||||
logger.warn("received a cluster state from [{}] and not part of the cluster, should not happen", incomingState.nodes().getMasterNode());
|
logger.warn("received a cluster state from [{}] and not part of the cluster, should not happen", incomingState.nodes().getMasterNode());
|
||||||
throw new IllegalStateException("received state from local node that does not match the current local node");
|
throw new IllegalStateException("received state with a local node that does not match the current local node");
|
||||||
}
|
}
|
||||||
|
|
||||||
ZenDiscovery.validateStateIsFromCurrentMaster(logger, currentNodes, incomingState);
|
ZenDiscovery.validateStateIsFromCurrentMaster(logger, currentNodes, incomingState);
|
||||||
|
|
|
@ -635,7 +635,7 @@ public class PublishClusterStateActionTests extends ESTestCase {
|
||||||
node.action.validateIncomingState(state, node.clusterState);
|
node.action.validateIncomingState(state, node.clusterState);
|
||||||
fail("node accepted state with non-existence local node");
|
fail("node accepted state with non-existence local node");
|
||||||
} catch (IllegalStateException OK) {
|
} catch (IllegalStateException OK) {
|
||||||
assertThat(OK.toString(), containsString("received state from local node that does not match the current local node"));
|
assertThat(OK.toString(), containsString("received state with a local node that does not match the current local node"));
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -646,7 +646,7 @@ public class PublishClusterStateActionTests extends ESTestCase {
|
||||||
node.action.validateIncomingState(state, node.clusterState);
|
node.action.validateIncomingState(state, node.clusterState);
|
||||||
fail("node accepted state with existent but wrong local node");
|
fail("node accepted state with existent but wrong local node");
|
||||||
} catch (IllegalStateException OK) {
|
} catch (IllegalStateException OK) {
|
||||||
assertThat(OK.toString(), containsString("received state from local node that does not match the current local node"));
|
assertThat(OK.toString(), containsString("received state with a local node that does not match the current local node"));
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.info("--> testing acceptance of an old cluster state");
|
logger.info("--> testing acceptance of an old cluster state");
|
||||||
|
|
Loading…
Reference in New Issue