commitlog: Simplify the return of read_log_file

This function really just wants to signal it is done, so return a
future<>.

Signed-off-by: Rafael Ávila de Espíndola <espindola@scylladb.com>
Message-Id: <20200128172847.31513-1-espindola@scylladb.com>
This commit is contained in:
Rafael Ávila de Espíndola
2020-01-28 09:28:47 -08:00
committed by Avi Kivity
parent 67deab0661
commit e4b8f52237
5 changed files with 6 additions and 27 deletions

View File

@@ -227,10 +227,7 @@ db::commitlog_replayer::impl::recover(sstring file, const sstring& fname_prefix)
return db::commitlog::read_log_file(file, fname_prefix, service::get_local_commitlog_priority(),
std::bind(&impl::process, this, s.get(), std::placeholders::_1),
p, &exts).then([](auto s) {
auto f = s->done();
return f.finally([s = std::move(s)] {});
}).then_wrapped([s](future<> f) {
p, &exts).then_wrapped([s](future<> f) {
try {
f.get();
} catch (commitlog::segment_data_corruption_error& e) {