From 167e400ca8eea9cbb3ef783be30720da55293d45 Mon Sep 17 00:00:00 2001 From: Duarte Nunes Date: Mon, 1 Aug 2016 16:28:36 +0000 Subject: [PATCH] compact_mutation: Don't count dead partitions With this patch we stop counting dead partitions (i.e., partitions containing only tombstones) towards the partition limit, which should apply only to partitions with live rows. Signed-off-by: Duarte Nunes --- mutation_compactor.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mutation_compactor.hh b/mutation_compactor.hh index a70c8d4586..924c7fff0b 100644 --- a/mutation_compactor.hh +++ b/mutation_compactor.hh @@ -231,7 +231,7 @@ public: } _row_limit -= _rows_in_current_partition; - _partition_limit -= 1; + _partition_limit -= _rows_in_current_partition > 0; _consumer.consume_end_of_partition(); if (!sstable_compaction()) { return _row_limit && _partition_limit ? stop_iteration::no : stop_iteration::yes; @@ -253,4 +253,4 @@ struct compact_for_query : compact_mutation struct compact_for_compaction : compact_mutation { using compact_mutation::compact_mutation; -}; \ No newline at end of file +};