]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: mdlog full sync, yield for each entry
authorYehuda Sadeh <yehuda@redhat.com>
Thu, 29 Oct 2015 18:25:45 +0000 (11:25 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 12 Feb 2016 00:13:25 +0000 (16:13 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_sync.cc

index 0eb97e2a59ff3cbd45216a42a8757bd198329a4c..3899638ad7669451ab00402709e1f7d6dce122ff 100644 (file)
@@ -546,6 +546,7 @@ class RGWFetchAllMetaCR : public RGWCoroutine {
   list<string> sections;
   list<string>::iterator sections_iter;
   list<string> result;
+  list<string>::iterator iter;
 
   RGWShardedOmapCRManager *entries_index;
 
@@ -633,12 +634,13 @@ public:
          call(new RGWReadRESTResourceCR<list<string> >(cct, conn, sync_env->http_manager,
                                       entrypoint, NULL, &result));
        }
-       yield {
-         if (get_ret_status() < 0) {
-            ldout(cct, 0) << "ERROR: failed to fetch metadata section: " << *sections_iter << dendl;
-           return set_state(RGWCoroutine_Error);
-         }
-         for (list<string>::iterator iter = result.begin(); iter != result.end(); ++iter) {
+        if (get_ret_status() < 0) {
+          ldout(cct, 0) << "ERROR: failed to fetch metadata section: " << *sections_iter << dendl;
+          return set_state(RGWCoroutine_Error);
+        }
+        iter = result.begin();
+        for (list<string>::iterator iter = result.begin(); iter != result.end(); ++iter) {
+          yield {
             if (!lease_cr->is_locked()) {
               lost_lock = true;
               break;