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

Index compaction considerations #41

Merged
merged 3 commits into from
Jun 4, 2024
Merged

Conversation

c247t
Copy link
Collaborator

@c247t c247t commented Jun 4, 2024

We want to compact trove maps on excessive oversize, but check only during add. Probably some legacy trade-off, since delete and add are used in update. This leaves a gap in case we keep removing from a particular dump, but never add or update afterwards, retaining the oversize indefinitely.

This solves the method nesting issue and ensures that on-demand compactions happen post-delete. Also, the tolerated oversize is reduced from 25% to 12%, since Trove guarantees <11% wasted space for large hash tables.

c247t added 2 commits June 4, 2024 15:22
 Trove guarantees <11% deviation wrt. prime capacity selection, so let's shrink accordingly if we keep deleting elements.
dump/src/util/dump/GroupIndex.java Outdated Show resolved Hide resolved
dump/src/util/dump/UniqueIndex.java Show resolved Hide resolved
@kelunik kelunik merged commit 80eb20c into master Jun 4, 2024
1 check passed
@kelunik kelunik deleted the index-compaction-considerations branch June 4, 2024 15:04
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.

2 participants