/* read sync status */
yield call(new RGWReadDataSyncStatusCoroutine(sync_env, &sync_status));
- if (retcode == -ENOENT) {
- sync_status.sync_info.num_shards = num_shards;
- } else if (retcode < 0 && retcode != -ENOENT) {
+ if (retcode < 0 && retcode != -ENOENT) {
ldout(sync_env->cct, 0) << "ERROR: failed to fetch sync status, retcode=" << retcode << dendl;
return set_cr_error(retcode);
}
/* state: init status */
if ((rgw_data_sync_info::SyncState)sync_status.sync_info.state == rgw_data_sync_info::StateInit) {
ldout(sync_env->cct, 20) << __func__ << "(): init" << dendl;
+ sync_status.sync_info.num_shards = num_shards;
yield call(new RGWInitDataSyncStatusCoroutine(sync_env, num_shards, &sync_status));
if (retcode < 0) {
ldout(sync_env->cct, 0) << "ERROR: failed to init sync, retcode=" << retcode << dendl;