Skip to content

Commit 95feb40

Browse files
committed
Remove superfluous validation of incoming states
This commit removes a superfluous check when validing incoming cluster states. The check in question prevents out-of-order cluster states from the same master from entering the queue. However, such out-of-order cluster states will be cleaned from the queue when a commit message for that cluster state arrives or a commit message for any higher-versioned cluster state arrives.
1 parent 66cc202 commit 95feb40

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

core/src/main/java/org/elasticsearch/discovery/zen/publish/PublishClusterStateAction.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -419,20 +419,6 @@ void validateIncomingState(ClusterState incomingState, ClusterState lastSeenClus
419419
throw new IllegalStateException(message);
420420
}
421421

422-
if (lastSeenClusterState != null && lastSeenClusterState.supersedes(incomingState)) {
423-
final String message = String.format(
424-
Locale.ROOT,
425-
"received cluster state from current master superseded by last seen cluster state; " +
426-
"received version [%d] with uuid [%s], last seen version [%d] with uuid [%s]",
427-
incomingState.version(),
428-
incomingState.stateUUID(),
429-
lastSeenClusterState.version(),
430-
lastSeenClusterState.stateUUID()
431-
);
432-
logger.warn(message);
433-
throw new IllegalStateException(message);
434-
}
435-
436422
}
437423

438424
protected void handleCommitRequest(CommitClusterStateRequest request, final TransportChannel channel) {

0 commit comments

Comments
 (0)