sstables/sstable: expose v2 variant of write_components()
In parallel to the existing v1 one. In the next patches we start migrating users to the v2 variant incrementally and finally remove the v1 variant.
This commit is contained in:
@@ -1673,6 +1673,23 @@ future<> sstable::write_components(
|
||||
});
|
||||
}
|
||||
|
||||
future<> sstable::write_components(
|
||||
flat_mutation_reader_v2 mr,
|
||||
uint64_t estimated_partitions,
|
||||
schema_ptr schema,
|
||||
const sstable_writer_config& cfg,
|
||||
encoding_stats stats,
|
||||
const io_priority_class& pc) {
|
||||
assert_large_data_handler_is_running();
|
||||
return seastar::async([this, mr = std::move(mr), estimated_partitions, schema = std::move(schema), cfg, stats, &pc] () mutable {
|
||||
auto close_mr = deferred_close(mr);
|
||||
auto wr = get_writer(*schema, estimated_partitions, cfg, stats, pc);
|
||||
mr.consume_in_thread(std::move(wr));
|
||||
}).finally([this] {
|
||||
assert_large_data_handler_is_running();
|
||||
});
|
||||
}
|
||||
|
||||
future<> sstable::generate_summary(const io_priority_class& pc) {
|
||||
if (_components->summary) {
|
||||
co_return;
|
||||
|
||||
@@ -70,6 +70,7 @@ namespace fs = std::filesystem;
|
||||
extern logging::logger sstlog;
|
||||
class key;
|
||||
class sstable_writer;
|
||||
class sstable_writer_v2;
|
||||
class sstables_manager;
|
||||
class metadata_collector;
|
||||
|
||||
@@ -259,6 +260,13 @@ public:
|
||||
encoding_stats stats,
|
||||
const io_priority_class& pc = default_priority_class());
|
||||
|
||||
future<> write_components(flat_mutation_reader_v2 mr,
|
||||
uint64_t estimated_partitions,
|
||||
schema_ptr schema,
|
||||
const sstable_writer_config&,
|
||||
encoding_stats stats,
|
||||
const io_priority_class& pc = default_priority_class());
|
||||
|
||||
sstable_writer get_writer(const schema& s,
|
||||
uint64_t estimated_partitions,
|
||||
const sstable_writer_config&,
|
||||
|
||||
Reference in New Issue
Block a user