]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/PGBackend: delete reply if fails to complete delete request
authorKefu Chai <kchai@redhat.com>
Wed, 23 Aug 2017 08:34:12 +0000 (16:34 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 23 Aug 2017 08:37:04 +0000 (16:37 +0800)
if any of the objects fails to be deleted due to pg reset after latest
osdmap, the pg recovery delete reply won't be sent to the primary OSD.
in that case, we should delete the reply.

Fixes: http://tracker.ceph.com/issues/20913
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/osd/PGBackend.cc

index a1adce752be93b2c76ef1474fa940fa194c06a51..ef500e3351d342a9e32893e5079e45395a577eed 100644 (file)
@@ -140,6 +140,8 @@ void PGBackend::handle_recovery_delete(OpRequestRef op)
     [=](int r) {
       if (r != -EAGAIN) {
        get_parent()->send_message_osd_cluster(reply, conn.get());
+      } else {
+       delete reply;
       }
     }));
   gather.activate();