mirror of https://github.com/apache/druid.git
fix bug in method reset of ByteBufferHashTable.java (#5100)
This commit is contained in:
parent
ec6774039e
commit
590633c595
|
@ -118,6 +118,10 @@ public class ByteBufferHashTable
|
||||||
tableStart = tableArenaSize - maxBuckets * bucketSizeWithHash;
|
tableStart = tableArenaSize - maxBuckets * bucketSizeWithHash;
|
||||||
int nextBuckets = maxBuckets * 2;
|
int nextBuckets = maxBuckets * 2;
|
||||||
while (true) {
|
while (true) {
|
||||||
|
long nextBucketsSize = (long) nextBuckets * bucketSizeWithHash;
|
||||||
|
if (nextBucketsSize > Integer.MAX_VALUE) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
final int nextTableStart = tableStart - nextBuckets * bucketSizeWithHash;
|
final int nextTableStart = tableStart - nextBuckets * bucketSizeWithHash;
|
||||||
if (nextTableStart > tableArenaSize / 2) {
|
if (nextTableStart > tableArenaSize / 2) {
|
||||||
tableStart = nextTableStart;
|
tableStart = nextTableStart;
|
||||||
|
|
Loading…
Reference in New Issue