merlimat commented on a change in pull request #9440:
URL: https://github.com/apache/pulsar/pull/9440#discussion_r569141846
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageIdImpl.java
##########
@@ -63,17 +78,17 @@ public int getPartitionIndex() {
@Override
public int hashCode() {
- return (int) (31 * (ledgerId + 31 * entryId) + partitionIndex);
+ return Objects.hash(ledgerId, entryId, partitionIndex, batchIndex);
Review comment:
This call will involve several allocations on the heap, because
`Objects.hash()` takes a `Object[]` and all the longs also need to get boxes
into `Long` instances.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]