Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OAK-11089: Allow SegmentReferences/RecordNumbers to provide their memory estimates #1733

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

Nicolapps
Copy link
Contributor

Closes OAK-11089:

The Segment#estimateMemoryUsage currently takes into account the number of record numbers and referenced segment IDs in the segment in order to provide the total size estimate.
This can be in issue when using implementations of RecordNumbers/SegmentReferences for which determining this total count is expensive. To improve this, we should allow RecordNumbers/SegmentReferences to provide themselves an estimate. By default, this estimation would be computed in the same way as we currently do, which makes this change backwards-compatible.

This PR also adds new unit tests for the new methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant