stcs: make most_interesting_bucket respect size-tiered options

Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com>
This commit is contained in:
Raphael S. Carvalho
2017-11-13 18:27:40 -02:00
parent d8ec913c34
commit 2b7f87474b

View File

@@ -164,7 +164,8 @@ public:
// Return the most interesting bucket for a set of sstables
static std::vector<sstables::shared_sstable>
most_interesting_bucket(const std::vector<sstables::shared_sstable>& candidates, int min_threshold, int max_threshold);
most_interesting_bucket(const std::vector<sstables::shared_sstable>& candidates, int min_threshold, int max_threshold,
size_tiered_compaction_strategy_options options = {});
};
inline std::vector<std::pair<sstables::shared_sstable, uint64_t>>
@@ -331,8 +332,9 @@ inline int64_t size_tiered_compaction_strategy::estimated_pending_compactions(co
}
inline std::vector<sstables::shared_sstable>
size_tiered_compaction_strategy::most_interesting_bucket(const std::vector<sstables::shared_sstable>& candidates, int min_threshold, int max_threshold) {
size_tiered_compaction_strategy cs;
size_tiered_compaction_strategy::most_interesting_bucket(const std::vector<sstables::shared_sstable>& candidates,
int min_threshold, int max_threshold, size_tiered_compaction_strategy_options options) {
size_tiered_compaction_strategy cs(options);
auto buckets = cs.get_buckets(candidates);