diff --git a/store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAClient.java b/store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAClient.java index 40e910fc0e..3eee5dad2b 100644 --- a/store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAClient.java +++ b/store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAClient.java @@ -86,6 +86,7 @@ public class AutoSwitchHAClient extends ServiceThread implements HAClient { * │ HANDSHAKE Header │ body │ * */ + @Deprecated public static final int HANDSHAKE_SIZE = HANDSHAKE_HEADER_SIZE + 50; /** @@ -105,7 +106,7 @@ public class AutoSwitchHAClient extends ServiceThread implements HAClient { private static final int READ_MAX_BUFFER_SIZE = 1024 * 1024 * 4; private final AtomicReference masterHaAddress = new AtomicReference<>(); private final AtomicReference masterAddress = new AtomicReference<>(); - private final ByteBuffer handshakeHeaderBuffer = ByteBuffer.allocate(HANDSHAKE_SIZE); + private final ByteBuffer handshakeHeaderBuffer = ByteBuffer.allocate(HANDSHAKE_HEADER_SIZE); private final ByteBuffer transferHeaderBuffer = ByteBuffer.allocate(TRANSFER_HEADER_SIZE); private final AutoSwitchHAService haService; private final ByteBuffer byteBufferRead = ByteBuffer.allocate(READ_MAX_BUFFER_SIZE);