Skip to content

Fix MultiScan Prepare() to support dictionary compression#13896

Closed
cbi42 wants to merge 2 commits intofacebook:mainfrom
cbi42:fix-dict-comp-multi-scan
Closed

Fix MultiScan Prepare() to support dictionary compression#13896
cbi42 wants to merge 2 commits intofacebook:mainfrom
cbi42:fix-dict-comp-multi-scan

Conversation

@cbi42
Copy link
Contributor

@cbi42 cbi42 commented Aug 22, 2025

Summary: I saw failure when added some asserts near

s = table_->CreateAndPinBlockInCache<Block_kData>(
read_options_, block, table_->get_rep()->decompressor.get(),
&tmp_contents,
&(pinned_data_blocks_guard[block_idx].As<Block_kData>()));
if (!s.ok()) {
in stress test. The decompression failed with error message like "Corruption: Failed zlib inflate: -3". This PR fixes the issue to use the right decompressor for dictionary compression.

Test plan: updated unit test that checks no I/O is done after Prepare(), this would fail before this change.

@meta-cla meta-cla bot added the CLA Signed label Aug 22, 2025
@facebook-github-bot
Copy link
Contributor

@cbi42 has imported this pull request. If you are a Meta employee, you can view this in D80821500.

@cbi42 cbi42 requested a review from anand1976 August 22, 2025 17:54
Copy link
Contributor

@anand1976 anand1976 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@facebook-github-bot
Copy link
Contributor

@cbi42 merged this pull request in 439e170.

xingbowang pushed a commit to xingbowang/rocksdb that referenced this pull request Sep 7, 2025
…3896)

Summary:
I saw failure when added some asserts near https://github.com/facebook/rocksdb/blob/b9957c991cae44959f96888369caf1b145398132/table/block_based/block_based_table_iterator.cc#L1201-L1205 in stress test. The decompression failed with error message like "Corruption: Failed zlib inflate: -3". This PR fixes the issue to use the right decompressor for dictionary compression.

Pull Request resolved: facebook#13896

Test Plan: updated unit test that checks no I/O is done after Prepare(), this would fail before this change.

Reviewed By: anand1976

Differential Revision: D80821500

Pulled By: cbi42

fbshipit-source-id: a4322c0da99a2d10e9787d0ec168668567c0c19a
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.

3 participants