]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/Objecter: handle reply race with pool deletion 3258/head
authorSage Weil <sage@redhat.com>
Tue, 23 Dec 2014 23:49:26 +0000 (15:49 -0800)
committerSage Weil <sage@redhat.com>
Tue, 23 Dec 2014 23:49:49 +0000 (15:49 -0800)
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>
src/osdc/Objecter.cc

index 695979d5c0427154be5c01a40aa28ec3f3e22584..57954a59b25280e8173a259d591bc3f9b807fe47 100644 (file)
@@ -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);