]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: data sync: add start_sync() callback
authorYehuda Sadeh <yehuda@redhat.com>
Tue, 3 Jul 2018 21:43:16 +0000 (14:43 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Tue, 11 Dec 2018 08:10:42 +0000 (00:10 -0800)
The existing init_sync() is only called when the sync is first initialized,
need a call for whenever sync runs.

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

index d742daa738348e576c814cba13ea5e62d67a288c..8c36c1bb368c7e4f971993dbb27571f1e1547604 100644 (file)
@@ -1594,6 +1594,8 @@ public:
         *reset_backoff = true;
       }
 
+      yield call(data_sync_module->start_sync(sync_env));
+
       yield {
         if  ((rgw_data_sync_info::SyncState)sync_status.sync_info.state == rgw_data_sync_info::StateSync) {
           tn->log(10, SSTR("spawning " << num_shards << " shards sync"));
index 88cb68c476803a0ddb4b8b93d1e86548f40f27be..3540d2fb05cf2fc1d58e10617e3df32b2444b1ad 100644 (file)
@@ -22,6 +22,9 @@ public:
     return nullptr;
   }
 
+  virtual RGWCoroutine *start_sync(RGWDataSyncEnv *sync_env) {
+    return nullptr;
+  }
   virtual RGWCoroutine *sync_object(RGWDataSyncEnv *sync_env, RGWBucketInfo& bucket_info, rgw_obj_key& key, std::optional<uint64_t> versioned_epoch, rgw_zone_set *zones_trace) = 0;
   virtual RGWCoroutine *remove_object(RGWDataSyncEnv *sync_env, RGWBucketInfo& bucket_info, rgw_obj_key& key, real_time& mtime,
                                       bool versioned, uint64_t versioned_epoch, rgw_zone_set *zones_trace) = 0;