From: Sage Weil Date: Tue, 23 Dec 2014 23:49:26 +0000 (-0800) Subject: osdc/Objecter: handle reply race with pool deletion X-Git-Tag: v0.80.8~9^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F3258%2Fhead;p=ceph.git 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 --- diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index 695979d5c04..57954a59b25 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);