From: Yehuda Sadeh Date: Tue, 3 Jul 2018 21:43:16 +0000 (-0700) Subject: rgw: data sync: add start_sync() callback X-Git-Tag: v14.1.0~616^2~50 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b78470627adc1735951c95af58ebd21c1096fdb7;p=ceph.git rgw: data sync: add start_sync() callback 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 --- diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index d742daa73834..8c36c1bb368c 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -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")); diff --git a/src/rgw/rgw_sync_module.h b/src/rgw/rgw_sync_module.h index 88cb68c47680..3540d2fb05cf 100644 --- a/src/rgw/rgw_sync_module.h +++ b/src/rgw/rgw_sync_module.h @@ -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 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;