rocksdb/options
Sagar Vemuri bc601a08e8 Periodic Compactions (#5166)
Summary:
Introducing Periodic Compactions.

This feature allows all the files in a CF to be periodically compacted. It could help in catching any corruptions that could creep into the DB proactively as every file is constantly getting re-compacted.  And also, of course, it helps to cleanup data older than certain threshold.

- Introduced a new option `periodic_compaction_time` to control how long a file can live without being compacted in a CF.
- This works across all levels.
- The files are put in the same level after going through the compaction. (Related files in the same level are picked up as `ExpandInputstoCleanCut` is used).
- Compaction filters, if any, are invoked as usual.
- A new table property, `file_creation_time`, is introduced to implement this feature. This property is set to the time at which the SST file was created (and that time is given by the underlying Env/OS).

This feature can be enabled on its own, or in conjunction with `ttl`. It is possible to set a different time threshold for the bottom level when used in conjunction with ttl. Since `ttl` works only on 0 to last but one levels, you could set `ttl` to, say, 1 day, and `periodic_compaction_time` to, say, 7 days. Since `ttl < periodic_compaction_time` all files in last but one levels keep getting picked up based on ttl, and almost never based on periodic_compaction_time. The files in the bottom level get picked up for compaction based on `periodic_compaction_time`.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5166

Differential Revision: D14884441

Pulled By: sagar0

fbshipit-source-id: 408426cbacb409c06386a98632dcf90bfa1bda47
2019-05-02 11:48:54 -07:00
..
cf_options.cc Periodic Compactions (#5166) 2019-05-02 11:48:54 -07:00
cf_options.h Periodic Compactions (#5166) 2019-05-02 11:48:54 -07:00
db_options.cc Fix many bugs in log statement arguments (#5089) 2019-04-04 12:12:11 -07:00
db_options.h Add DBOptions. avoid_unnecessary_blocking_io to defer file deletions (#5043) 2019-04-01 17:10:40 -07:00
options_helper.cc Periodic Compactions (#5166) 2019-05-02 11:48:54 -07:00
options_helper.h add OptionType kInt32T and kInt64T 2019-03-12 13:49:52 -07:00
options_parser.cc add OptionType kInt32T and kInt64T 2019-03-12 13:49:52 -07:00
options_parser.h WritePrepared Txn: Optimize for recoverable state 2017-11-01 17:26:46 -07:00
options_sanity_check.cc Change RocksDB License 2017-07-15 16:11:23 -07:00
options_sanity_check.h Change RocksDB License 2017-07-15 16:11:23 -07:00
options_settable_test.cc Periodic Compactions (#5166) 2019-05-02 11:48:54 -07:00
options_test.cc Option string/map can set merge operator from object registry (#5123) 2019-03-28 14:54:29 -07:00
options.cc Periodic Compactions (#5166) 2019-05-02 11:48:54 -07:00