ascherbakoff commented on code in PR #2720:
URL: https://github.com/apache/ignite-3/pull/2720#discussion_r1421722749
##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/LockKey.java:
##########
@@ -73,6 +75,12 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
+ // Apply more efficient hashing to byte buffers to decrease collisions
+ if (key instanceof ByteBuffer) {
+ ByteBuffer key1 = (ByteBuffer) key;
+ return HashUtils.hash32(HashUtils.hash64(key1, 0, key1.capacity(),
contextId != null ? contextId.hashCode() : 0));
Review Comment:
What is wrong here? I need to get 32 bit hash as a result of mixing byte
array hash with a seed.
--
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]