From f20225cb99a0d2d08fccfdf88dc89d758ecba077 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 23 Dec 2014 15:49:26 -0800 Subject: [PATCH] osdc/Objecter: handle reply race with pool deletion We need to handle this scenario: - send request in epoch X - osd replies - pool is deleted in epoch X+1 - client gets map X+1, sends a map check - client handles reply -> asserts that no map checks are in flight This isn't the best solution. We could infer that a map check isn't needed since the pool existed earlier and doesn't now. But this is firefly and the fix is no more expensive than the old assert. Fixes: #10372 Signed-off-by: Sage Weil --- src/osdc/Objecter.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index 695979d5c042..57954a59b252 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -1615,7 +1615,10 @@ void Objecter::finish_op(Op *op) ops.erase(op->tid); logger->set(l_osdc_op_active, ops.size()); - assert(check_latest_map_ops.find(op->tid) == check_latest_map_ops.end()); + + // our reply may have raced with pool deletion resulting in a map + // check in flight. + op_cancel_map_check(op); if (op->ontimeout) timer.cancel_event(op->ontimeout); -- 2.47.3