Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit 05bd90a

Browse files
committed
Compare capacity, not size, to MAX_CAPACITY
1 parent 2a20d71 commit 05bd90a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unsafe/src/main/java/org/apache/spark/unsafe/map/BytesToBytesMap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ public void putNewKey(
486486
longArray.set(pos * 2 + 1, keyHashcode);
487487
updateAddressesAndSizes(storedKeyAddress);
488488
isDefined = true;
489-
if (size > growthThreshold && size < MAX_CAPACITY) {
489+
if (size > growthThreshold && longArray.size() < MAX_CAPACITY) {
490490
growAndRehash();
491491
}
492492
}

0 commit comments

Comments
 (0)