]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: quiet down ECANCELED on put_obj_meta() 439/head
authorYehuda Sadeh <yehuda@inktank.com>
Tue, 16 Jul 2013 20:42:03 +0000 (13:42 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Tue, 16 Jul 2013 21:08:20 +0000 (14:08 -0700)
Fixes: #5439
ECANCELED there means that we lost in a race to write the object. We
should treat it as a successful write. This is reviving an old behavior
that was changed inadvertently.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/rgw/rgw_rados.cc

index c9d6c70980b3e4ca0d1622db5479de4bc2f9b8ca..5e305cbf29a62bd8e2ead77aaef477397c264d3e 100644 (file)
@@ -2301,6 +2301,11 @@ done_cancel:
   if (ret < 0) {
     ldout(cct, 0) << "ERROR: complete_update_index_cancel() returned ret=" << ret << dendl;
   }
+  /* we lost in a race, object was already overwritten, we
+   * should treat it as a success
+   */
+  if (r == -ECANCELED)
+    r = 0;
   return r;
 }