there is chance stop() and umount() methods get called even if start()
is not called in the error handling path. in that case, just make these
methods no-op. to ensure that OSD behaves in that case.
Signed-off-by: Kefu Chai <kchai@redhat.com>
seastar::future<> AlienStore::stop()
{
- assert(tp);
+ if (!tp) {
+ // not really started yet
+ return seastar::now();
+ }
return tp->submit([this] {
for (auto [cid, ch]: coll_map) {
static_cast<AlienCollection*>(ch.get())->collection.reset();
seastar::future<> AlienStore::umount()
{
logger().info("{}", __func__);
- assert(tp);
+ if (!tp) {
+ // not really started yet
+ return seastar::now();
+ }
return transaction_gate.close().then([this] {
return tp->submit([this] {
return store->umount();