[
https://issues.apache.org/jira/browse/ARTEMIS-4986?focusedWorklogId=930060&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-930060
]
ASF GitHub Bot logged work on ARTEMIS-4986:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 13/Aug/24 14:23
Start Date: 13/Aug/24 14:23
Worklog Time Spent: 10m
Work Description: clebertsuconic commented on code in PR #5145:
URL: https://github.com/apache/activemq-artemis/pull/5145#discussion_r1715390499
##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/quorum/QuorumManager.java:
##########
@@ -348,19 +377,42 @@ public synchronized void voteComplete() {
}
}
- private Vote sendQuorumVote(ClusterControl clusterControl, SimpleString
handler, Vote vote) {
+ private Vote sendQuorumVote(ClusterControl clusterControl, SimpleString
handler, SimpleString oldHandlerName, Vote vote) {
try {
final ClientSessionFactoryInternal sessionFactory =
clusterControl.getSessionFactory();
final String remoteAddress =
sessionFactory.getConnection().getRemoteAddress();
ActiveMQServerLogger.LOGGER.sendingQuorumVoteRequest(remoteAddress,
vote.toString());
- QuorumVoteReplyMessage replyMessage = (QuorumVoteReplyMessage)
clusterControl.getClusterChannel().get()
- .sendBlocking(new QuorumVoteMessage(handler, vote),
PacketImpl.QUORUM_VOTE_REPLY);
+
+ QuorumVoteReplyMessage replyMessage = null;
+
+ Channel clusterChannel = clusterControl.getClusterChannel().get();
+
+
+ // We first try the current packet with a medium timeout
+ replyMessage = (QuorumVoteReplyMessage)
clusterChannel.sendBlocking(new QuorumVoteMessage(handler, vote), -1,
PacketImpl.QUORUM_VOTE_REPLY, VOTE_RESPONSE_TIMEOUT, false);
+ logger.trace("This is the reply message from the current version =
{}", replyMessage);
+
+ // if no response, we try the previous versions, with still a medium
timeout
+ if (replyMessage == null && oldHandlerName != null) {
+ replyMessage = (QuorumVoteReplyMessage)
clusterChannel.sendBlocking(new QuorumVoteMessage(oldHandlerName, vote), -1,
PacketImpl.QUORUM_VOTE_REPLY, VOTE_RESPONSE_TIMEOUT, false);
+ logger.trace("This is the reply message from the older version =
{}", replyMessage);
+ }
Review Comment:
I will bump the release to avoid these checks if dealing with a current
release
Issue Time Tracking
-------------------
Worklog Id: (was: 930060)
Time Spent: 1h 40m (was: 1.5h)
> Replication/Vote incompatibility between 2.30 and 2.31+
> -------------------------------------------------------
>
> Key: ARTEMIS-4986
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4986
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: Broker
> Affects Versions: 2.31.0
> Reporter: Clebert Suconic
> Assignee: Clebert Suconic
> Priority: Major
> Fix For: 2.37.0
>
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> The change for "ARTEMIS-3474 replace non-inclusive terms" changed a String
> that was used on the wire for Voting. That string was sent on the Vote and
> the other nodes would fail with the following message:
> AMQ224090: This node is not configured for Quorum Voting, all nodes must be
> configured for HA
> The server will simply not respond the VoteRequest on that case and the
> blockCall timeout will fail.
> To fix this I'm applying a shorter timeout that will just be ignored and
> retry at the older packet in case the response wasn't found.
> I was trying to play with Wire versioning but that scenario turned out to be
> more complex.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact