Skip to content

Commit

Permalink
Fix allocate size by add 9 bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
maobaolong committed Jul 22, 2024
1 parent b5cac30 commit 5da4167
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,15 @@ public RssSendShuffleDataResponse sendShuffleData(RssSendShuffleDataRequest requ
0L,
stb.getValue(),
System.currentTimeMillis());
int allocateSize = size + sendShuffleDataRequest.encodedLength();
// headerEncodedLength = messageEncodedLength + messageTypeEncodedLength + bodyLength +
// messageEncodedLength
// {@link org.apache.uniffle.common.netty.MessageEncoder#encode}
int headerEncodedLength =
Integer.BYTES
+ sendShuffleDataRequest.type().encodedLength()
+ Integer.BYTES
+ sendShuffleDataRequest.encodedLength();
int allocateSize = headerEncodedLength + size;
int finalBlockNum = blockNum;
try {
RetryUtils.retryWithCondition(
Expand Down

0 comments on commit 5da4167

Please sign in to comment.