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 <sage@redhat.com>
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);