843d2e3137
Summary: This adds a new metablock containing a shared dictionary that is used to compress all data blocks in the SST file. The size of the shared dictionary is configurable in CompressionOptions and defaults to 0. It's currently only used for zlib/lz4/lz4hc, but the block will be stored in the SST regardless of the compression type if the user chooses a nonzero dictionary size. During compaction, computes the dictionary by randomly sampling the first output file in each subcompaction. It pre-computes the intervals to sample by assuming the output file will have the maximum allowable length. In case the file is smaller, some of the pre-computed sampling intervals can be beyond end-of-file, in which case we skip over those samples and the dictionary will be a bit smaller. After the dictionary is generated using the first file in a subcompaction, it is loaded into the compression library before writing each block in each subsequent file of that subcompaction. On the read path, gets the dictionary from the metablock, if it exists. Then, loads that dictionary into the compression library before reading each block. Test Plan: new unit test Reviewers: yhchiang, IslamAbdelRahman, cyan, sdong Reviewed By: sdong Subscribers: andrewkr, yoshinorim, kradhakrishnan, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D52287 |
||
---|---|---|
.. | ||
dump | ||
rdb | ||
auto_sanity_test.sh | ||
benchmark_leveldb.sh | ||
benchmark.sh | ||
check_format_compatible.sh | ||
db_bench_tool.cc | ||
db_bench.cc | ||
db_crashtest.py | ||
db_repl_stress.cc | ||
db_sanity_test.cc | ||
db_stress.cc | ||
dbench_monitor | ||
Dockerfile | ||
generate_random_db.sh | ||
ldb_cmd_execute_result.h | ||
ldb_cmd_test.cc | ||
ldb_cmd.cc | ||
ldb_cmd.h | ||
ldb_test.py | ||
ldb_tool.cc | ||
ldb.cc | ||
pflag | ||
reduce_levels_test.cc | ||
rocksdb_dump_test.sh | ||
run_flash_bench.sh | ||
run_leveldb.sh | ||
sample-dump.dmp | ||
sst_dump_test.cc | ||
sst_dump_tool_imp.h | ||
sst_dump_tool.cc | ||
sst_dump.cc | ||
verify_random_db.sh | ||
write_stress_runner.py | ||
write_stress.cc |