Skip to content

Clean up btrblocks compressor interface#7274

Merged
connortsui20 merged 1 commit intodevelopfrom
ct/pluggable-writer
Apr 2, 2026
Merged

Clean up btrblocks compressor interface#7274
connortsui20 merged 1 commit intodevelopfrom
ct/pluggable-writer

Conversation

@connortsui20
Copy link
Copy Markdown
Contributor

Summary

We had a very strange interface for the BtrBlocksCompressor and builder previously. However, now that the compressor is fully pluggable, we can make it a lot nicer.

API Changes

Reduces the API (and really the semantics) of the BtrBlocksCompressor to just a default with a methods that allow us to add new (pluggable) schemes and exclude schemes by ID. And then for compact encodings there's just a simple helper function that wraps those with_compact.

Testing

The interface changes, but none of the logic changed.

Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
@connortsui20 connortsui20 added the changelog/break A breaking API change label Apr 2, 2026
@connortsui20 connortsui20 enabled auto-merge (squash) April 2, 2026 20:44
@connortsui20 connortsui20 merged commit b573853 into develop Apr 2, 2026
64 of 65 checks passed
@connortsui20 connortsui20 deleted the ct/pluggable-writer branch April 2, 2026 20:47
connortsui20 added a commit that referenced this pull request Apr 3, 2026
## Summary

Continuation of #7274

Cleans up the `WriteStrategyBuilder` interface to allow EITHER an opaque
compressor OR a `BtrBlocksCompressorBuilder` that we can modify at any
point before building the write strategy.

## API Changes

`WriteStrategyBuilder` now allows you to add a compressor plugin that
will only override a default `BtrBlocksCompressorBuilder`. This means
that whenever we add specific encodings, we are still able to exclude
things like `IntDictScheme` when building the data compressor (which we
did not do before)

## Testing

The APIs have changed but the logic hasn't really changed, so existing
tests should suffice.

Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/break A breaking API change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants