Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ public DocVector(IntVector shards, IntVector segments, IntVector docs, Boolean s
blockFactory().adjustBreaker(BASE_RAM_BYTES_USED);
}

public DocVector(IntVector shards, IntVector segments, IntVector docs, int[] docMapForwards, int[] docMapBackwards) {
this(shards, segments, docs, null);
this.shardSegmentDocMapForwards = docMapForwards;
this.shardSegmentDocMapBackwards = docMapBackwards;
}

public IntVector shards() {
return shards;
}
Expand Down Expand Up @@ -209,8 +215,12 @@ protected void swap(int i, int j) {
}
}

public static long sizeOfSegmentDocMap(int positionCount) {
return 2 * (((long) RamUsageEstimator.NUM_BYTES_ARRAY_HEADER) + ((long) Integer.BYTES) * positionCount);
}

private long sizeOfSegmentDocMap() {
return 2 * (((long) RamUsageEstimator.NUM_BYTES_ARRAY_HEADER) + ((long) Integer.BYTES) * shards.getPositionCount());
return sizeOfSegmentDocMap(getPositionCount());
}

@Override
Expand Down
Loading