mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-23 18:10:39 +00:00
commitlog::read_log_file: Preserve subscription across reading
Fixes #6265
Return type for read_log_file was previously changed from
subscription to future<>, returning the previously returned
subscriptions result of done(). But it did not preserve the
subscription itself, which in turn will cause us to (in
work::stream), call back into a deleted object.
Message-Id: <20200422090856.5218-1-calle@scylladb.com>
(cherry picked from commit 525b283326)
This commit is contained in:
@@ -2133,8 +2133,9 @@ db::commitlog::read_log_file(const sstring& filename, const sstring& pfx, seasta
|
||||
}).handle_exception([w](auto ep) {
|
||||
w->s.set_exception(ep);
|
||||
});
|
||||
|
||||
return ret.done();
|
||||
// #6265 - must keep subscription alive.
|
||||
auto res = ret.done();
|
||||
return res.finally([ret = std::move(ret)] {});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user