From 0c2f480c3a749d7544516725e31d36b360ddbf6b Mon Sep 17 00:00:00 2001 From: TheR1sing3un Date: Thu, 16 Feb 2023 21:27:39 +0800 Subject: [PATCH] fix(broker): mark unless attribute with @Deprecated 1. mark unless attribute with @Deprecated --- .../rocketmq/store/ha/autoswitch/AutoSwitchHAClient.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);