3c37b3cccd
Summary: Up to this point, the subcompactions that make up a compaction job have been divided based on the key range of the L1 files, and each subcompaction has handled the key range of only one file. However DBOption.max_subcompactions allows the user to designate how many subcompactions at most to perform. This patch updates the CompactionJob::GetSubcompactionBoundaries() to determine these divisions accordingly based on that option and other input/system factors. The current approach orders the starting and/or ending keys of certain compaction input files and then generates a histogram to approximate the size covered by the key range between each consecutive pair of keys. Then it groups these ranges into groups so that the sizes are approximately equal to one another. The approach has also been adapted to work for universal compaction as well instead of just for level-based compaction as it was before. These subcompactions are then executed in parallel by locally spawning threads, one for each. The results are then aggregated and the compaction completed. Test Plan: make all && make check Reviewers: yhchiang, anthony, igor, noetzli, sdong Reviewed By: sdong Subscribers: MarkCallaghan, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D43269 |
||
---|---|---|
.. | ||
utilities | ||
c.h | ||
cache.h | ||
compaction_filter.h | ||
compaction_job_stats.h | ||
comparator.h | ||
convenience.h | ||
db.h | ||
delete_scheduler.h | ||
env.h | ||
experimental.h | ||
filter_policy.h | ||
flush_block_policy.h | ||
immutable_options.h | ||
iostats_context.h | ||
iterator.h | ||
ldb_tool.h | ||
listener.h | ||
memtablerep.h | ||
merge_operator.h | ||
metadata.h | ||
options.h | ||
perf_context.h | ||
perf_level.h | ||
rate_limiter.h | ||
slice_transform.h | ||
slice.h | ||
snapshot.h | ||
sst_dump_tool.h | ||
statistics.h | ||
status.h | ||
table_properties.h | ||
table.h | ||
thread_status.h | ||
transaction_log.h | ||
types.h | ||
universal_compaction.h | ||
version.h | ||
write_batch_base.h | ||
write_batch.h |