lcs: remove useless expensive check for overlapping L1 sstables

there's no way a L1 sstable will be in candidates set which was
previously built from list of L0 sstables.

Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com>
This commit is contained in:
Raphael S. Carvalho
2017-06-19 19:29:38 -03:00
parent 71600eb298
commit 90db2d7eba

View File

@@ -617,13 +617,7 @@ public:
// if the overlapping ones are already busy in a compaction, leave it out.
// TODO try to find a set of L0 sstables that only overlaps with non-busy L1 sstables
auto l1overlapping = overlapping(*_schema, candidates, get_level(1));
for (auto candidate : l1overlapping) {
auto it = std::find(candidates.begin(), candidates.end(), candidate);
if (it != candidates.end()) {
continue;
}
candidates.push_back(candidate);
}
candidates.insert(candidates.end(), l1overlapping.begin(), l1overlapping.end());
}
if (candidates.size() < 2) {
return {};