You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/09/26 03:42:42 UTC

[GitHub] [pulsar] BewareMyPower commented on a diff in pull request #17833: [refactor][java] Unify the acknowledge process for batch and non-batch message IDs

BewareMyPower commented on code in PR #17833:
URL: https://github.com/apache/pulsar/pull/17833#discussion_r979536545


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/BatchMessageIdImpl.java:
##########
@@ -147,6 +147,12 @@ public MessageIdImpl prevBatchMessageId() {
             ledgerId, entryId - 1, partitionIndex);
     }
 
+    // MessageIdImpl is widely used as the key of a hash map, in this case, we should convert the batch message id to
+    // have the correct hash code.
+    public MessageIdImpl getMessageIdImpl() {

Review Comment:
   Good suggestion. `get` usually means returning an internal field (`A` -> `A.x`), while `to` usually means the conversion (`A -> B`). Addressed.



-- 
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-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org