summaryrefslogtreecommitdiff
path: root/build_tools
diff options
context:
space:
mode:
authorSagar Vemuri <svemuri@fb.com>2018-04-02 21:57:28 -0700
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2018-04-02 22:14:28 -0700
commit04c11b867df9190da204e38357a14d20296fb244 (patch)
tree3fe301c5f4f990390ca160b60dd1a895e9279791 /build_tools
parentdf144244102e7a0c7f3aab3b5640200a27c418a3 (diff)
Level Compaction with TTL
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
Diffstat (limited to 'build_tools')
0 files changed, 0 insertions, 0 deletions