Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cloud-fan committed Feb 10, 2018
1 parent 51d381f commit 8dab79a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ public UnsafeKVExternalSorter(
// The point array will be used to do in-place sort, which require half of the space to be
// empty. Note: each record in the map takes two entries in the point array, one is record
// pointer, another is the key prefix.
// TODO: It's possible to change UnsafeInMemorySorter to have multiple entries with same key,
// so that we can always reuse the point array.
if (map.numValues() > map.getArray().size() / 4) {
pointArray = map.allocateArray(map.numValues() * 4);
pointArray = map.allocateArray(map.numValues() * 4L);
} else {
pointArray = map.getArray();
}
Expand Down

0 comments on commit 8dab79a

Please sign in to comment.