compaction: fix max_purgeable calculation

max_purgeable was being incorrectly calculated because the code
that creates vector of uncompacted sstables was wrong.
This value is used to determine whether or not a tombstone can
be purged.
Operand < is supposed to be used instead in the callback passed
as third parameter to boost::set_difference.
This fix is a step towards closing the issue #676.

Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com>
This commit is contained in:
Raphael S. Carvalho
2015-12-28 18:34:41 -02:00
committed by Pekka Enberg
parent 46767fcacf
commit b7d36af26f

View File

@@ -113,7 +113,7 @@ future<> compact_sstables(std::vector<shared_sstable> sstables,
std::vector<shared_sstable> not_compacted_sstables;
boost::set_difference(*all_sstables | boost::adaptors::map_values, sstables,
std::back_inserter(not_compacted_sstables), [] (const shared_sstable& x, const shared_sstable& y) {
return x->generation() == y->generation();
return x->generation() < y->generation();
});
auto schema = cf.schema();