sstables: add error injection point in write_components
Add a `write_components_writer_created` error injection point in `sstable::write_components()` between writer creation and fragment consumption. This injection is needed by the out-of-space streaming test (added in the next patch) to reliably pause SSTable writing at the right moment: after the SSTable writer has been created and files exist on disk, but before mutation fragments are consumed. Pausing earlier (before writer creation) would not work because there are no files on disk yet, while pausing later (after consuming fragments) would be too late to reliably push the node into critical disk utilization.
This commit is contained in:
@@ -2531,6 +2531,7 @@ future<> sstable::write_components(
|
||||
return seastar::async([this, mr = std::move(mr), estimated_partitions, schema = std::move(schema), cfg, stats] () mutable {
|
||||
auto close_mr = deferred_close(mr);
|
||||
auto wr = get_writer(*schema, estimated_partitions, cfg, stats);
|
||||
utils::get_local_injector().inject("write_components_writer_created", utils::wait_for_message(std::chrono::seconds(30))).get();
|
||||
mr.consume_in_thread(std::move(wr));
|
||||
}).finally([this] {
|
||||
assert_large_data_handler_is_running();
|
||||
|
||||
Reference in New Issue
Block a user