]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw:multisite: fix RGWRadosRemoveOmapKeysCR
authorlu.shasha <lu.shasha@eisoo.com>
Fri, 7 Jul 2017 03:09:02 +0000 (11:09 +0800)
committerlu.shasha <lu.shasha@eisoo.com>
Tue, 11 Jul 2017 02:50:07 +0000 (10:50 +0800)
RGWRadosRemoveOmapKeysCR::request_complete return val is wrong. The return val should get from completion.  Some member variables is not used, clear up those variables.

Fixes:http://tracker.ceph.com/issues/20539

Signed-off-by: Shasha Lu <lu.shasha@eisoo.com>
src/rgw/rgw_cr_rados.cc
src/rgw/rgw_cr_rados.h

index 21f4a00f47a68f9fa0af5620cf22b1772fdfb9cd..cd83d8aa0b695ef87a9388ba1ba1d3f5289b1ac5 100644 (file)
@@ -316,6 +316,15 @@ int RGWRadosRemoveOmapKeysCR::send_request() {
   return ref.ioctx.aio_operate(ref.oid, cn->completion(), &op);
 }
 
+int RGWRadosRemoveOmapKeysCR::request_complete()
+{
+  int r = cn->completion()->get_return_value();
+
+  set_status() << "request complete; ret=" << r;
+
+  return r;
+}
+
 RGWRadosRemoveCR::RGWRadosRemoveCR(RGWRados *store, const rgw_raw_obj& obj)
   : RGWSimpleCoroutine(store->ctx()), store(store), obj(obj)
 {
index c75fa5862f02ac3dbbf637344913bb393ec90439..100e200b8ea7a561f9bb1340c190fde93cce7def 100644 (file)
@@ -441,18 +441,13 @@ public:
 class RGWRadosRemoveOmapKeysCR : public RGWSimpleCoroutine {
   RGWRados *store;
 
-  string marker;
-  map<string, bufferlist> *entries;
-  int max_entries;
-
-  int rval;
   rgw_rados_ref ref;
 
   set<string> keys;
 
   rgw_raw_obj obj;
 
-  RGWAioCompletionNotifier *cn;
+  boost::intrusive_ptr<RGWAioCompletionNotifier> cn;
 
 public:
   RGWRadosRemoveOmapKeysCR(RGWRados *_store,
@@ -463,9 +458,7 @@ public:
 
   int send_request() override;
 
-  int request_complete() override {
-    return rval;
-  }
+  int request_complete() override;
 };
 
 class RGWRadosRemoveCR : public RGWSimpleCoroutine {