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
ZSTD_TrainDictionary runs even when the compression is set to kNoCompression for a given level #12409
Comments
Another case is |
are you referring to rocksdb/table/block_based/block_based_table_builder.cc Lines 1874 to 1887 in 210c8df
I can help with the sanitizations - is the level information available inside |
Yes.
Yes , edit: Technically the answer to your question is no, but my point is |
I have attempted a fix #12420. PTAL! |
ZSTD_TrainDictionary [link] runs for
SSTFileWriter::Finish
even whenbottommost_compression
option is set tokNoCompression
. This reduces throughput forSstFileWriter::Finish
We construct rocksdb options using ZSTD compression for levels including 2 and above. For levels 0 and 1, we set it to
kNoCompression
. We also setzstd_max_train_bytes
to a non-zero positive value (which is applicable for levels with ZSTD compression enabled). These options are used for the database and also passed toSstFileWriter
for creating sst files to be later added to that database. Since the BlockBasedTableBuilder::Finish [link] only checks forzstd_max_train_bytes
to be non-zero positive value, it runsZSTD_TrainDictionary
even when it shouldn't sinceSSTFileWriter
is operating at bottommost levelExpected behavior
If the bottommost_compression or compression_per_level for a level is set to
kNoCompression
, then don't runZSTD_TrainDictionary
Actual behavior
ZSTD_TrainDictionary
is also run for level which haskNoCompression
setThe text was updated successfully, but these errors were encountered: