]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: full data sync, pass correct op
authorYehuda Sadeh <yehuda@redhat.com>
Tue, 10 Nov 2015 22:12:58 +0000 (14:12 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 12 Feb 2016 00:13:31 +0000 (16:13 -0800)
Need to specify appropriate op (depending on whether object is
versioned or not versioned).

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

index 8c3a28e3ec10a37ba6ed667f064e1f139707f75d..60729756245ab5d803358533c0cd9241be9aeae0 100644 (file)
@@ -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<rgw_obj_key>(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();