Skip to content

Commit 43d8f02

Browse files
authored
IGNITE-26832 Fix buffer size for reading RecoveryLastReceivedMessage (#12465)
1 parent 84a6199 commit 43d8f02

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/messages/RecoveryLastReceivedMessage.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
package org.apache.ignite.spi.communication.tcp.messages;
1919

2020
import org.apache.ignite.internal.Order;
21+
import org.apache.ignite.internal.direct.stream.DirectByteBufferStream;
2122
import org.apache.ignite.internal.util.typedef.internal.S;
2223
import org.apache.ignite.plugin.extensions.communication.Message;
2324
import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
@@ -38,8 +39,12 @@ public class RecoveryLastReceivedMessage implements Message {
3839
/** Initiator node is not in current topogy. */
3940
public static final long UNKNOWN_NODE = -4;
4041

41-
/** Message body size in bytes. */
42-
private static final int MESSAGE_SIZE = 8;
42+
/**
43+
* Message body size in bytes. In worst case it uses 10 bytes for serialization.
44+
*
45+
* @see DirectByteBufferStream#writeLong(long).
46+
*/
47+
private static final int MESSAGE_SIZE = 10;
4348

4449
/** Full message size (with message type) in bytes. */
4550
public static final int MESSAGE_FULL_SIZE = MESSAGE_SIZE + DIRECT_TYPE_SIZE;

0 commit comments

Comments
 (0)