]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: data sync shard controller re-read sync status
authorYehuda Sadeh <yehuda@redhat.com>
Mon, 14 Mar 2016 01:10:48 +0000 (18:10 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Mon, 14 Mar 2016 01:10:48 +0000 (18:10 -0700)
We re-read it when the shard cr is done, before calling a new one. Otherwise
the sync status we send is incorrect.

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

index db1eb196ae55c78b4aac0a56ad3391b05297568d..35798b4c780c3717d53bfa806c68a2ea73266a60 100644 (file)
@@ -1136,6 +1136,13 @@ public:
     return new RGWDataSyncShardCR(sync_env, pool, shard_id, sync_marker, backoff_ptr());
   }
 
+  RGWCoroutine *alloc_finisher_cr() {
+    RGWRados *store = sync_env->store;
+    RGWObjectCtx obj_ctx(store, NULL);
+    return new RGWSimpleRadosReadCR<rgw_data_sync_marker>(sync_env->async_rados, store, obj_ctx, store->get_zone_params().log_pool,
+                                                    RGWDataSyncStatusManager::shard_obj_name(sync_env->source_zone, shard_id), &sync_marker);
+  }
+
   void append_modified_shards(set<string>& keys) {
     Mutex::Locker l(cr_lock());