ARTEMIS-1741 - log warning if a node isnt configured for quorum voting
https://issues.apache.org/jira/browse/ARTEMIS-1741
This commit is contained in:
parent
2cc163da79
commit
3c6876ece6
|
@ -1918,4 +1918,9 @@ public interface ActiveMQServerLogger extends BasicLogger {
|
||||||
@LogMessage(level = Logger.Level.WARN)
|
@LogMessage(level = Logger.Level.WARN)
|
||||||
@Message(id = 224089, value = "Failed to calculate persistent size", format = Message.Format.MESSAGE_FORMAT)
|
@Message(id = 224089, value = "Failed to calculate persistent size", format = Message.Format.MESSAGE_FORMAT)
|
||||||
void errorCalculatePersistentSize(@Cause Throwable e);
|
void errorCalculatePersistentSize(@Cause Throwable e);
|
||||||
|
|
||||||
|
@LogMessage(level = Logger.Level.WARN)
|
||||||
|
@Message(id = 224090, value = "This node is not configured for Quorum Voting, all nodes must be configured for HA", format = Message.Format.MESSAGE_FORMAT)
|
||||||
|
void noVoteHandlerConfigured();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -378,6 +378,10 @@ public class ClusterController implements ActiveMQComponent {
|
||||||
} else if (packet.getType() == PacketImpl.QUORUM_VOTE) {
|
} else if (packet.getType() == PacketImpl.QUORUM_VOTE) {
|
||||||
QuorumVoteMessage quorumVoteMessage = (QuorumVoteMessage) packet;
|
QuorumVoteMessage quorumVoteMessage = (QuorumVoteMessage) packet;
|
||||||
QuorumVoteHandler voteHandler = quorumManager.getVoteHandler(quorumVoteMessage.getHandler());
|
QuorumVoteHandler voteHandler = quorumManager.getVoteHandler(quorumVoteMessage.getHandler());
|
||||||
|
if (voteHandler == null) {
|
||||||
|
ActiveMQServerLogger.LOGGER.noVoteHandlerConfigured();
|
||||||
|
return;
|
||||||
|
}
|
||||||
quorumVoteMessage.decode(voteHandler);
|
quorumVoteMessage.decode(voteHandler);
|
||||||
ActiveMQServerLogger.LOGGER.receivedQuorumVoteRequest(quorumVoteMessage.getVote().toString());
|
ActiveMQServerLogger.LOGGER.receivedQuorumVoteRequest(quorumVoteMessage.getVote().toString());
|
||||||
Vote vote = quorumManager.vote(quorumVoteMessage.getHandler(), quorumVoteMessage.getVote());
|
Vote vote = quorumManager.vote(quorumVoteMessage.getHandler(), quorumVoteMessage.getVote());
|
||||||
|
|
Loading…
Reference in New Issue