BewareMyPower commented on a change in pull request #11607: URL: https://github.com/apache/pulsar/pull/11607#discussion_r685168151
########## File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/PersistentAcknowledgmentsGroupingTracker.java ########## @@ -115,10 +115,11 @@ public PersistentAcknowledgmentsGroupingTracker(ConsumerImpl<?> consumer, Consum */ @Override public boolean isDuplicate(@NonNull MessageId messageId) { - if (lastCumulativeAck.messageId == null) { + final MessageId messageIdOfLastAck = lastCumulativeAck.messageId; Review comment: I think the best way is to replace all the external access to `messageId` with a synchronized method of `LastCumulativeAck`, what do you think? -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org