mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
sstables: Use inject(wait_for_message_overload)
This place could be in the pre-previous patch, it just can use the overload, but it seemengly has a bug. It prints _two_ messages -- that the injection handler was suspended and that it was woken up. The bug is in the 2nd message -- it's printed without waiting for the message, so it likely gets printed before wakeup itself. It seems that no tests care about it though. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
@@ -1548,12 +1548,7 @@ future<> sstable::reload_reclaimed_components() {
|
||||
co_return;
|
||||
}
|
||||
|
||||
co_await utils::get_local_injector().inject("reload_reclaimed_components/pause", [] (auto& handler) {
|
||||
sstlog.info("reload_reclaimed_components/pause init");
|
||||
auto ret = handler.wait_for_message(std::chrono::steady_clock::now() + std::chrono::seconds{5});
|
||||
sstlog.info("reload_reclaimed_components/pause done");
|
||||
return ret;
|
||||
});
|
||||
co_await utils::get_local_injector().inject("reload_reclaimed_components/pause", utils::wait_for_message(std::chrono::seconds(5)));
|
||||
|
||||
co_await read_filter();
|
||||
_total_reclaimable_memory.reset();
|
||||
@@ -1957,12 +1952,7 @@ future<uint64_t> sstable::validate(reader_permit permit, abort_source& abort,
|
||||
if (errors) {
|
||||
co_return errors;
|
||||
}
|
||||
co_await utils::get_local_injector().inject("sstable_validate/pause", [] (auto& handler) {
|
||||
sstlog.info("sstable_validate/pause init");
|
||||
auto ret = handler.wait_for_message(std::chrono::steady_clock::now() + std::chrono::seconds{5});
|
||||
sstlog.info("sstable_validate/pause done");
|
||||
return ret;
|
||||
});
|
||||
co_await utils::get_local_injector().inject("sstable_validate/pause", utils::wait_for_message(std::chrono::seconds(5)));
|
||||
|
||||
if (_version >= sstable_version_types::mc) {
|
||||
co_return co_await mx::validate(shared_from_this(), std::move(permit), abort, std::move(error_handler), monitor);
|
||||
|
||||
Reference in New Issue
Block a user