commit | ed56b863625ec6e9ed05ca58e13329e332ebe457 | [log] [tgz] |
---|---|---|
author | Ali Alsuliman <ali.al.solaiman@gmail.com> | Mon May 10 19:53:45 2021 +0300 |
committer | Ali Alsuliman <ali.al.solaiman@gmail.com> | Mon May 10 18:23:32 2021 +0000 |
tree | b6c5ac5c38dfcf2f107fef9a10cacfa4abf4e7fb | |
parent | a0d1fb7acb588f4eab940501deee738789e9af50 [diff] |
[NO ISSUE][TX] Ensure lock manager computes valid indexes for hash table - user model changes: no - storage format changes: no - interface changes: no Details: Given a dataset id and an entity hash value, ensure that the lock manager computes a valid index for looking up the hash table. Change-Id: I33d342455a79d0d69b49e126ff6a40c47b07d0dd Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/11403 Reviewed-by: Ali Alsuliman <ali.al.solaiman@gmail.com> Reviewed-by: Michael Blow <mblow@apache.org> Tested-by: Michael Blow <mblow@apache.org> Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
diff --git a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/ResourceGroupTable.java b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/ResourceGroupTable.java index 93cda83..a82b302 100644 --- a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/ResourceGroupTable.java +++ b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/ResourceGroupTable.java
@@ -41,7 +41,7 @@ ResourceGroup get(int dId, int entityHashValue) { // TODO ensure good properties of hash function - return table[Math.abs(dId ^ entityHashValue) % size]; + return table[Math.abs((dId ^ entityHashValue) % size)]; } ResourceGroup get(int i) {