From: Yehuda Sadeh Date: Tue, 10 Nov 2015 22:12:58 +0000 (-0800) Subject: rgw: full data sync, pass correct op X-Git-Tag: v10.1.0~354^2~224 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fdbb968147b4d04625f67dcb1b07851f3e6f90fb;p=ceph.git rgw: full data sync, pass correct op Need to specify appropriate op (depending on whether object is versioned or not versioned). Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index 8c3a28e3ec10..60729756245a 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -1918,8 +1918,11 @@ int RGWBucketShardFullSyncCR::operate() total_entries++; marker_tracker->start(entry.key, total_entries, utime_t()); list_marker = entry.key; + + RGWModifyOp op = (entry.key.instance.empty() || entry.key.instance == "null" ? CLS_RGW_OP_ADD : CLS_RGW_OP_LINK_OLH); + spawn(new RGWBucketSyncSingleEntryCR(store, async_rados, source_zone, bucket_info, shard_id, - entry.key, entry.versioned_epoch, entry.mtime, CLS_RGW_OP_ADD, entry.key, marker_tracker), false); + entry.key, entry.versioned_epoch, entry.mtime, op, entry.key, marker_tracker), false); } while ((int)num_spawned() > spawn_window) { yield wait_for_child();