rocksdb/table/plain
Yu Zhang c73cf7a878 Add CompactForTieringCollector to support automatically trigger compaction for tiering use case (#12760)
Summary:
This PR adds user property collector factory `CompactForTieringCollectorFactory` to support observe SST file and mark it as need compaction for fast tracking data to the proper tier.

A triggering ratio `compaction_trigger_ratio_` can be configured to achieve the following:
1) Setting the ratio to be equal to or smaller than 0 disables this collector
2) Setting the ratio to be within (0, 1] will write the number of observed eligible entries into a user property and marks a file as need-compaction when aforementioned condition is met.
3) Setting the ratio to be higher than 1 can be used to just writes the user table property, and not mark any file as need compaction.
 For a column family that does not enable tiering feature, even if an effective configuration is provided, this collector is still disabled. For a file that is already on the last level, this collector is also disabled.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/12760

Test Plan: Added unit tests

Reviewed By: pdillinger

Differential Revision: D58734976

Pulled By: jowlyzhang

fbshipit-source-id: 6daab2c4f62b5c6689c3c03e3b3907bbbe6b7a81
2024-06-18 10:51:29 -07:00
..
plain_table_bloom.cc Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
plain_table_bloom.h Meta-internal folly integration with F14FastMap (#9546) 2022-04-13 07:34:01 -07:00
plain_table_builder.cc Add CompactForTieringCollector to support automatically trigger compaction for tiering use case (#12760) 2024-06-18 10:51:29 -07:00
plain_table_builder.h Rename IntTblPropCollector -> InternalTblPropColl (#12320) 2024-02-02 14:14:43 -08:00
plain_table_factory.cc Rename IntTblPropCollector -> InternalTblPropColl (#12320) 2024-02-02 14:14:43 -08:00
plain_table_factory.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
plain_table_index.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
plain_table_index.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
plain_table_key_coding.cc Group SST write in flush, compaction and db open with new stats (#11910) 2023-12-29 15:29:23 -08:00
plain_table_key_coding.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
plain_table_reader.cc Fix kBlockCacheTier read when merge-chain base value is in a blob file (#12462) 2024-03-21 12:38:53 -07:00
plain_table_reader.h Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00