rocksdb/db/compaction
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
..
clipping_iterator.h
clipping_iterator_test.cc
compaction.cc
compaction.h
compaction_iteration_stats.h
compaction_iterator.cc Add CompactForTieringCollector to support automatically trigger compaction for tiering use case (#12760) 2024-06-18 10:51:29 -07:00
compaction_iterator.h Add CompactForTieringCollector to support automatically trigger compaction for tiering use case (#12760) 2024-06-18 10:51:29 -07:00
compaction_iterator_test.cc Add CompactForTieringCollector to support automatically trigger compaction for tiering use case (#12760) 2024-06-18 10:51:29 -07:00
compaction_job.cc Add CompactForTieringCollector to support automatically trigger compaction for tiering use case (#12760) 2024-06-18 10:51:29 -07:00
compaction_job.h Add CompactForTieringCollector to support automatically trigger compaction for tiering use case (#12760) 2024-06-18 10:51:29 -07:00
compaction_job_stats_test.cc Replace ScopedArenaIterator with ScopedArenaPtr<InternalIterator> (#12470) 2024-03-22 13:40:42 -07:00
compaction_job_test.cc
compaction_outputs.cc Preserve TimedPut on penultimate level until it actually expires (#12543) 2024-04-30 11:16:02 -07:00
compaction_outputs.h Preserve TimedPut on penultimate level until it actually expires (#12543) 2024-04-30 11:16:02 -07:00
compaction_picker.cc Fix crash in CompactFiles() of conflict range under preclude_last_level_data_seconds > 0 (#12628) 2024-05-13 13:12:06 -07:00
compaction_picker.h Fix crash in CompactFiles() of conflict range under preclude_last_level_data_seconds > 0 (#12628) 2024-05-13 13:12:06 -07:00
compaction_picker_fifo.cc
compaction_picker_fifo.h
compaction_picker_level.cc Limit compaction input files expansion (#12484) 2024-03-29 11:34:29 -07:00
compaction_picker_level.h
compaction_picker_test.cc Improve universal compaction sorted-run trigger (#12477) 2024-05-24 10:10:31 -07:00
compaction_picker_universal.cc Improve universal compaction sorted-run trigger (#12477) 2024-05-24 10:10:31 -07:00
compaction_picker_universal.h
compaction_service_job.cc
compaction_service_test.cc
compaction_state.cc
compaction_state.h
file_pri.h
sst_partitioner.cc
subcompaction_state.cc
subcompaction_state.h
tiered_compaction_test.cc Add CompactForTieringCollector to support automatically trigger compaction for tiering use case (#12760) 2024-06-18 10:51:29 -07:00