BewareMyPower commented on code in PR #20948:
URL: https://github.com/apache/pulsar/pull/20948#discussion_r1310130118
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java:
##########
@@ -1459,6 +1460,29 @@ private ByteBuf processMessageChunk(ByteBuf
compressedPayload, MessageMetadata m
// discard message if chunk is out-of-order
if (chunkedMsgCtx == null || chunkedMsgCtx.chunkedMsgBuffer == null
|| msgMetadata.getChunkId() !=
(chunkedMsgCtx.lastChunkedMessageId + 1)) {
+// Filter and ack duplicated chunks instead of discard ctx.
+// For example:
+// Chunk-1 sequence ID: 0, chunk ID: 0, msgID: 1:1
+// Chunk-2 sequence ID: 0, chunk ID: 1, msgID: 1:2
+// Chunk-3 sequence ID: 0, chunk ID: 2, msgID: 1:3
+// Chunk-4 sequence ID: 0, chunk ID: 1, msgID: 1:4
+// Chunk-5 sequence ID: 0, chunk ID: 2, msgID: 1:5
+// Chunk-6 sequence ID: 0, chunk ID: 3, msgID: 1:6
+// We should filter and ack chunk-4 and chunk-5.
Review Comment:
Make comments indent aligned.
```suggestion
// Filter and ack duplicated chunks instead of discard ctx.
// For example:
// Chunk-1 sequence ID: 0, chunk ID: 0, msgID: 1:1
// Chunk-2 sequence ID: 0, chunk ID: 1, msgID: 1:2
// Chunk-3 sequence ID: 0, chunk ID: 2, msgID: 1:3
// Chunk-4 sequence ID: 0, chunk ID: 1, msgID: 1:4
// Chunk-5 sequence ID: 0, chunk ID: 2, msgID: 1:5
// Chunk-6 sequence ID: 0, chunk ID: 3, msgID: 1:6
// We should filter and ack chunk-4 and chunk-5.
```
--
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]