gemmellr commented on code in PR #5145:
URL: https://github.com/apache/activemq-artemis/pull/5145#discussion_r1716538664


##########
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketImpl.java:
##########
@@ -53,6 +53,8 @@ public class PacketImpl implements Packet {
    // 2.29.0
    public static final int ARTEMIS_2_29_0_VERSION = 135;
 
+   public static final int ARTEMIS_2_36_0_VERSION = 136;

Review Comment:
   This constant is named wrong. 2.36.0 was already released, so this new 136 
wire version will apply from 2.37.0.



##########
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/Channel.java:
##########
@@ -57,6 +57,14 @@ public interface Channel {
     */
    boolean supports(byte packetID, int version);
 
+   /*
+    * Due to ARTEMIS-4986, older versions (2.30.0 in particular) will require 
a special voting handling,

Review Comment:
   ARTEMIS-4986 was introduced in 2.32.0, so as noted before I dont understand 
the references to 2.30.0. The vote string mismatch issue would apply between 
versions <= 2.31.2 and versions 2.32.0-2.36.0.



##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/quorum/QuorumManager.java:
##########
@@ -348,23 +377,59 @@ 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();
+
+         if (clusterChannel.requireSpecialVotingHandling()) {
+            logger.trace("Using special handling mechanism for Voting to cope 
with previous version");
+            // if the wire versioning is from before 2.36.0, we try the vote 
for former versions

Review Comment:
   Should be "from before 2.37.0"



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to