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:
committed by
Avi Kivity
parent
67deab0661
commit
e4b8f52237
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user