ce3b2912d2
Summary: Level Compaction with TTL. As of today, a file could exist in the LSM tree without going through the compaction process for a really long time if there are no updates to the data in the file's key range. For example, in certain use cases, the keys are not actually "deleted"; instead they are just set to empty values. There might not be any more writes to this "deleted" key range, and if so, such data could remain in the LSM for a really long time resulting in wasted space. Introducing a TTL could solve this problem. Files (and, in turn, data) older than TTL will be scheduled for compaction when there is no other background work. This will make the data go through the regular compaction process and get rid of old unwanted data. This also has the (good) side-effect of all the data in the non-bottommost level being newer than ttl, and all data in the bottommost level older than ttl. It could lead to more writes while reducing space. This functionality can be controlled by the newly introduced column family option -- ttl. TODO for later: - Make ttl mutable - Extend TTL to Universal compaction as well? (TTL is already supported in FIFO) - Maybe deprecate CompactionOptionsFIFO.ttl in favor of this new ttl option. Closes https://github.com/facebook/rocksdb/pull/3591 Differential Revision: D7275442 Pulled By: sagar0 fbshipit-source-id: dcba484717341200d419b0953dafcdf9eb2f0267 |
||
---|---|---|
.. | ||
utilities | ||
advanced_options.h | ||
c.h | ||
cache.h | ||
cleanable.h | ||
compaction_filter.h | ||
compaction_job_stats.h | ||
comparator.h | ||
convenience.h | ||
db_bench_tool.h | ||
db_dump_tool.h | ||
db.h | ||
env_encryption.h | ||
env.h | ||
experimental.h | ||
filter_policy.h | ||
flush_block_policy.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 | ||
persistent_cache.h | ||
rate_limiter.h | ||
slice_transform.h | ||
slice.h | ||
snapshot.h | ||
sst_dump_tool.h | ||
sst_file_manager.h | ||
sst_file_writer.h | ||
statistics.h | ||
status.h | ||
table_properties.h | ||
table.h | ||
thread_status.h | ||
threadpool.h | ||
transaction_log.h | ||
types.h | ||
universal_compaction.h | ||
version.h | ||
wal_filter.h | ||
write_batch_base.h | ||
write_batch.h | ||
write_buffer_manager.h |