Files
scylladb/sstables/compaction.hh
Nadav Har'El 0b297b9f6c sstable compaction: simplify compact_sstables() function
Instead of requiring the user to subclass a "sstable_creator" class to
specify how to create a new sstable (or in the future, several of them),
switch to an std::function.

In practice, it is much easier to specify a lambda than a class, especialy
since C++11 made it easy to capture variables into lambdas - but not into
local classes.

The "commit()" function is also unnecessary. Then intention there was to
provide a function to "commit" the new sstables (i.e., rename them).
But the caller doesn't need to supply this function - it can just wait
for the future of the end of compaction, and do his own committing code
right then.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-06-24 16:44:11 +03:00

15 lines
280 B
C++

/*
* Copyright (C) 2015 Cloudius Systems, Ltd.
*
*/
#pragma once
#include "sstables.hh"
#include <functional>
namespace sstables {
future<> compact_sstables(std::vector<shared_sstable> sstables,
schema_ptr schema, std::function<shared_sstable()> creator);
}