rocksdb/include/rocksdb
Andrew Kryczka 843d2e3137 Shared dictionary compression using reference block
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
2016-04-27 17:36:03 -07:00
..
utilities Delete deprecated *BackupableDB interface for backups 2016-04-18 09:04:14 -07:00
c.h Shared dictionary compression using reference block 2016-04-27 17:36:03 -07:00
cache.h Adding pin_l0_filter_and_index_blocks_in_cache feature and related fixes. 2016-04-01 10:42:39 -07:00
compaction_filter.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
compaction_job_stats.h Rename options.compaction_measure_io_stats to options.report_bg_io_stats and include flush too. 2016-04-15 10:22:18 -07:00
comparator.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
convenience.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
db_bench_tool.h Separeate main from bench functionality to allow cusomizations 2016-02-16 06:17:31 -08:00
db_dump_tool.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
db.h Add per-level compression ratio property 2016-04-20 18:46:54 -07:00
env.h Make WritableFileWrapper not screw up preallocation 2016-03-23 09:14:56 -07:00
experimental.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
filter_policy.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
flush_block_policy.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
immutable_options.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
iostats_context.h IOStatsContext::ToString() add option to exclude zero counters 2016-02-23 10:26:24 -08:00
iterator.h Introduce PinnedIteratorsManager (Reduce PinData() overhead / Refactor PinData) 2016-04-26 12:41:07 -07:00
ldb_tool.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
listener.h Fix lite_build 2015-12-22 11:58:13 -08:00
memtablerep.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
merge_operator.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
metadata.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
options.h Shared dictionary compression using reference block 2016-04-27 17:36:03 -07:00
perf_context.h Update comments on include/rocksdb/perf_context.h 2016-04-08 11:27:08 -07:00
perf_level.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
rate_limiter.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
slice_transform.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
slice.h to/from hex refactor 2016-03-30 14:36:48 -07:00
snapshot.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
sst_dump_tool.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
sst_file_manager.h Introduce SstFileManager::SetMaxAllowedSpaceUsage() to cap disk space usage 2016-02-17 15:20:23 -08:00
sst_file_writer.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
statistics.h Cache to have an option to fail Cache::Insert() when full 2016-03-10 17:35:19 -08:00
status.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
table_properties.h Shared dictionary compression using reference block 2016-04-27 17:36:03 -07:00
table.h Introduce PinnedIteratorsManager (Reduce PinData() overhead / Refactor PinData) 2016-04-26 12:41:07 -07:00
thread_status.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
transaction_log.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
types.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
universal_compaction.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
version.h Release RocksDB 4.7 2016-04-13 15:03:08 -07:00
wal_filter.h Avoid overloaded virtual function 2016-03-22 17:10:31 -07:00
write_batch_base.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
write_batch.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00