poorbarcode commented on code in PR #21048:
URL: https://github.com/apache/pulsar/pull/21048#discussion_r1310047869


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/UnAckedMessageTracker.java:
##########
@@ -138,8 +138,11 @@ public void run(Timeout t) throws Exception {
                         if (!headPartition.isEmpty()) {
                             log.info("[{}] {} messages will be re-delivered", 
consumerBase, headPartition.size());
                             headPartition.forEach(messageId -> {
-                                
addChunkedMessageIdsAndRemoveFromSequenceMap(messageId, messageIds, 
consumerBase);
-                                messageIds.add(messageId);
+                                if (messageId instanceof ChunkMessageIdImpl) {
+                                    
addChunkedMessageIdsAndRemoveFromSequenceMap(messageId, messageIds, 
consumerBase);
+                                } else {
+                                    messageIds.add(messageId);

Review Comment:
   And could you add a test to ensure that the chunked message info can be 
removed from the `UnAckedMessageTracker` after the chunked messages are 
acknowledged or negatively acknowledged? I didn't find any similar tests, so 
adding a test to ensure all things work as expected is better. Thanks
   
   



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