Skip to content

Minor compression refactoring #13539

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

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

Conversation

pdillinger
Copy link
Contributor

@pdillinger pdillinger commented Apr 12, 2025

Summary:

  • Mostly, remove sample_for_compression from CompressionInfo because it's not used by the core function it serves, CompressData(). Confusing (and inefficient), especially in db_bench where it appears to use FLAGS_sample_for_compression in places where it is actually ignored.
  • Various clarifying comments, clean-ups, and tiny optimizations
  • Prepare some structures like CompressionDict for more usage
  • Some TODOs and FIXMEs about some things I've noticed are amiss, confusing, or excessive
  • A notable optimization opportunity that might become a "pay as you go" improvement for the potential indirection costs of customizable compression: use C++23's resize_and_overwrite() in compress functions to avoid zeroing the string buffer contents before populating it.

Test Plan: existing tests / CI

Summary:
* ...

Test Plan: existing tests / CI
@pdillinger pdillinger requested a review from hx235 April 12, 2025 00:31
pdillinger added a commit to pdillinger/rocksdb that referenced this pull request Apr 12, 2025
Summary:
* Stacked on facebook#13539
* ...

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

Successfully merging this pull request may close these issues.

2 participants