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

Manual Compaction #45

Open
scottcarey opened this issue Nov 22, 2019 · 0 comments
Open

Manual Compaction #45

scottcarey opened this issue Nov 22, 2019 · 0 comments
Labels
question Need more discussion

Comments

@scottcarey
Copy link

scottcarey commented Nov 22, 2019

One of my use cases involves building a large K/V dataset in one location, then closing the data store, transfering and replicating the contents to other locations and initializing them elsewhere.

For this use case, I would like to have a method to do manual compaction.

Perhaps a method void compact(float threshold) that compacts all data files that have more than threshold ratio of overwritten bytes would be best. For example, calling compact(0.01) would result in all files that have over 1% of their space deleted to be compacted.

This could be used for my use case as well as several others. It also would be a useful tool for compaction performance measurement.

scottcarey pushed a commit to scottcarey/HaloDB that referenced this issue Dec 3, 2019
  Add the 'forceCompaction' method to HaloDB,
  which takes a compactionThreshold value and
  will trigger compaction on all files that have
  stale data above the threshold.

  Additionally clean up how pauseCompaction()
  works so that it awaits pending compactions.
@bellofreedom bellofreedom added the question Need more discussion label Dec 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Need more discussion
Projects
None yet
Development

No branches or pull requests

2 participants