]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix for bucket delete racing with mdlog sync 11648/head
authorCasey Bodley <cbodley@redhat.com>
Tue, 25 Oct 2016 17:01:59 +0000 (13:01 -0400)
committerCasey Bodley <cbodley@redhat.com>
Tue, 25 Oct 2016 21:07:01 +0000 (17:07 -0400)
Fixes: http://tracker.ceph.com/issues/17698
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_op.cc

index 9bd377915e88182873677dcca14f358e42d69d8c..be18f794e633d16e28813f11ddfb1302a605fe19 100644 (file)
@@ -2481,6 +2481,14 @@ void RGWDeleteBucket::execute()
   }
 
   op_ret = store->delete_bucket(s->bucket, ot);
+
+  if (op_ret == -ECANCELED) {
+    // lost a race, either with mdlog sync or another delete bucket operation.
+    // in either case, we've already called rgw_unlink_bucket()
+    op_ret = 0;
+    return;
+  }
+
   if (op_ret == 0) {
     op_ret = rgw_unlink_bucket(store, s->user->user_id, s->bucket.tenant,
                               s->bucket.name, false);