liangyepianzhou commented on code in PR #20948:
URL: https://github.com/apache/pulsar/pull/20948#discussion_r1311001993


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/MessageDeduplication.java:
##########
@@ -367,6 +386,11 @@ public MessageDupStatus isDuplicate(PublishContext 
publishContext, ByteBuf heade
             }
             highestSequencedPushed.put(producerName, highestSequenceId);
         }
+        // Only put sequence ID into highestSequencedPushed and
+        // highestSequencedPersisted until receive and persistent the last 
chunk.

Review Comment:
   We do not need to chunk it in line 387 because we check it in line 360.
   ```java
           if (chunkID != -1 && chunkID != totalChunk - 1) {
               publishContext.setProperty(IS_LAST_CHUNK, Boolean.FALSE);
               return MessageDupStatus.NotDup;
           }



-- 
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]

Reply via email to