]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: do not ignore EEXIST in RGWPutObj::execute 23207/head
authorMatt Benjamin <mbenjamin@redhat.com>
Thu, 12 Jul 2018 20:42:29 +0000 (16:42 -0400)
committerMatt Benjamin <mbenjamin@redhat.com>
Tue, 24 Jul 2018 14:25:16 +0000 (10:25 -0400)
The existing logic appears able to cause propagation of a failed
exclusive create to the client, when it should instead have been
retried, due to disagreement about the logical write offset. (The
value of ofs here could be > 0 due to the operation of a stacked
write filter [e.g., compressor], when the RADOS write offset was
0 and hence an exclusive write that should be retried).

Rationale for fix by Casey.

http://tracker.ceph.com/issues/22790
(cherry picked from commit 7c18258e54741a54bdeb59d4da7fd4fee73e8618)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/rgw_op.cc

index 98a6db4703f2caa1471757c95ff06ec00a5dc096..54096cbf822f28950efca2fc34642b30763b6593 100644 (file)
@@ -3500,7 +3500,7 @@ void RGWPutObj::execute()
 
     op_ret = put_data_and_throttle(filter, data, ofs, need_to_wait);
     if (op_ret < 0) {
-      if (!need_to_wait || op_ret != -EEXIST) {
+      if (op_ret != -EEXIST) {
         ldout(s->cct, 20) << "processor->thottle_data() returned ret="
                          << op_ret << dendl;
         goto done;