liangyepianzhou commented on code in PR #20948:
URL: https://github.com/apache/pulsar/pull/20948#discussion_r1304479565
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/MessageDeduplication.java:
##########
@@ -337,12 +338,23 @@ public MessageDupStatus isDuplicate(PublishContext
publishContext, ByteBuf heade
publishContext.setOriginalHighestSequenceId(highestSequenceId);
headersAndPayload.readerIndex(readerIndex);
}
-
+ long chunkID = 0;
+ if (publishContext.isChunked()) {
+ if (md == null) {
+ headersAndPayload.markReaderIndex();
Review Comment:
This is for performance reasons. We shouldn’t parse metadata every time.
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/MessageDeduplication.java:
##########
@@ -337,12 +338,23 @@ public MessageDupStatus isDuplicate(PublishContext
publishContext, ByteBuf heade
publishContext.setOriginalHighestSequenceId(highestSequenceId);
headersAndPayload.readerIndex(readerIndex);
}
-
+ long chunkID = 0;
+ if (publishContext.isChunked()) {
+ if (md == null) {
+ headersAndPayload.markReaderIndex();
Review Comment:
This is for performance reasons. We shouldn’t parse metadata every time.
--
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]