use of com.hazelcast.cp.internal.raft.exception.MismatchingGroupMembersCommitIndexException in project hazelcast by hazelcast.
the class MembershipChangeTask method isValidGroupMemberCommitIndex.
private boolean isValidGroupMemberCommitIndex() {
if (groupMembersCommitIndex != null) {
RaftState state = raftNode.state();
RaftGroupMembers groupMembers = state.committedGroupMembers();
if (groupMembers.index() != groupMembersCommitIndex) {
logger.severe("Cannot " + membershipChangeMode + " " + member + " because expected members commit index: " + groupMembersCommitIndex + " is different than group members commit index: " + groupMembers.index());
Exception e = new MismatchingGroupMembersCommitIndexException(groupMembers.index(), groupMembers.members());
resultFuture.completeExceptionally(e);
return false;
}
}
return true;
}
Aggregations