From 2b7f87474b36a187dacbbcc8bb35fc187f2b0496 Mon Sep 17 00:00:00 2001 From: "Raphael S. Carvalho" Date: Mon, 13 Nov 2017 18:27:40 -0200 Subject: [PATCH] stcs: make most_interesting_bucket respect size-tiered options Signed-off-by: Raphael S. Carvalho --- sstables/size_tiered_compaction_strategy.hh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sstables/size_tiered_compaction_strategy.hh b/sstables/size_tiered_compaction_strategy.hh index edabf10c95..6abc3d6423 100644 --- a/sstables/size_tiered_compaction_strategy.hh +++ b/sstables/size_tiered_compaction_strategy.hh @@ -164,7 +164,8 @@ public: // Return the most interesting bucket for a set of sstables static std::vector - most_interesting_bucket(const std::vector& candidates, int min_threshold, int max_threshold); + most_interesting_bucket(const std::vector& candidates, int min_threshold, int max_threshold, + size_tiered_compaction_strategy_options options = {}); }; inline std::vector> @@ -331,8 +332,9 @@ inline int64_t size_tiered_compaction_strategy::estimated_pending_compactions(co } inline std::vector -size_tiered_compaction_strategy::most_interesting_bucket(const std::vector& candidates, int min_threshold, int max_threshold) { - size_tiered_compaction_strategy cs; +size_tiered_compaction_strategy::most_interesting_bucket(const std::vector& 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);