codelipenghui commented on code in PR #18405:
URL: https://github.com/apache/pulsar/pull/18405#discussion_r1018760062
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageIdImpl.java:
##########
@@ -155,8 +155,14 @@ public static MessageId fromByteArrayWithTopic(byte[]
data, TopicName topicName)
MessageId messageId;
if (idData.hasBatchIndex()) {
- messageId = new BatchMessageIdImpl(idData.getLedgerId(),
idData.getEntryId(), idData.getPartition(),
- idData.getBatchIndex(), idData.getBatchSize(),
BatchMessageAcker.newAcker(idData.getBatchSize()));
+ if (idData.hasBatchSize()) {
Review Comment:
Is there any case in that we will have a batch index but no batch size?
Maybe we should throw an exception due to it should be the case that
corrupted data is provided.
--
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]