lhotari commented on code in PR #18390:
URL: https://github.com/apache/pulsar/pull/18390#discussion_r1312636778
##########
pulsar-common/src/main/java/org/apache/pulsar/common/util/collections/ConcurrentLongLongPairHashMap.java:
##########
@@ -361,7 +368,7 @@ LongPair get(long key1, long key2, int keyHash) {
}
}
- bucket = (bucket + 4) & (table.length - 1);
Review Comment:
The original code seems strange to me.
* Why is there a bitwise AND operation?
It looks like a bug. modulus seems to make more sense. @merlimat could you
please check?
--
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]