Jason918 commented on code in PR #17936:
URL: https://github.com/apache/pulsar/pull/17936#discussion_r998871942
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/BatchMessageContainerImpl.java:
##########
@@ -293,14 +302,27 @@ public OpSendMsg createOpSendMsg() throws IOException {
messageMetadata.getHighestSequenceId(), numMessagesInBatch,
messageMetadata, encryptedPayload);
OpSendMsg op = OpSendMsg.create(messages, cmd,
messageMetadata.getSequenceId(),
- messageMetadata.getHighestSequenceId(), firstCallback);
+ messageMetadata.getHighestSequenceId(), firstCallback,
batchAllocatedSizeBytes);
op.setNumMessagesInBatch(numMessagesInBatch);
op.setBatchSizeByte(currentBatchSizeBytes);
lowestSequenceId = -1L;
return op;
}
+ private void reserveBatchAllocatedSizeWhenInit(int batchAllocatedInitSize)
{
Review Comment:
The logic seems to be the same as `updateBatchAllocatedSizeWhenLeave` when
`batchAllocatedSizeBytes` == 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]