]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: check init_sync return code
authorYehuda Sadeh <yehuda@redhat.com>
Thu, 25 May 2017 23:54:18 +0000 (16:54 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Tue, 30 May 2017 20:27:00 +0000 (13:27 -0700)
fix following review

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

index fe1696b605d9e5fa4811f803bbdf42b7b193c44a..9b2aefe70e409685bf8786d85149ca6ad9600278 100644 (file)
@@ -1491,7 +1491,11 @@ public:
 
       if  ((rgw_data_sync_info::SyncState)sync_status.sync_info.state == rgw_data_sync_info::StateBuildingFullSyncMaps) {
         /* call sync module init here */
-        call(data_sync_module->init_sync(sync_env));
+        yield call(data_sync_module->init_sync(sync_env));
+        if (retcode < 0) {
+          ldout(sync_env->cct, 0) << "ERROR: sync module init_sync() failed, retcode=" << retcode << dendl;
+          return set_cr_error(retcode);
+        }
         /* state: building full sync maps */
         ldout(sync_env->cct, 20) << __func__ << "(): building full sync maps" << dendl;
         yield call(new RGWListBucketIndexesCR(sync_env, &sync_status));