From 6b253e72612d0021a6f3cd61d77ba829dc62abc8 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Tue, 6 Oct 2020 17:59:09 -0400 Subject: [PATCH] rgw: rename to rgw_read_bucket_inc_sync_status Signed-off-by: Casey Bodley --- src/rgw/rgw_admin.cc | 2 +- src/rgw/rgw_data_sync.cc | 12 ++++++------ src/rgw/rgw_data_sync.h | 14 +++++++------- src/rgw/rgw_rest_log.cc | 6 ++++-- src/rgw/rgw_sync_checkpoint.cc | 7 ++++--- 5 files changed, 22 insertions(+), 19 deletions(-) diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 6d10387fb3598..fed7f7165a6e1 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -2496,7 +2496,7 @@ static int bucket_source_sync_status(const DoutPrefixProvider *dpp, rgw::sal::Ra pipe.dest.bucket = bucket_info.bucket; std::vector status; - r = rgw_bucket_sync_status(dpp, store, pipe, bucket_info, &source_bucket->get_info(), &status); + r = rgw_read_bucket_inc_sync_status(dpp, store, pipe, bucket_info, &source_bucket->get_info(), &status); if (r < 0) { ldpp_dout(dpp, -1) << "failed to read bucket sync status: " << cpp_strerror(r) << dendl; return r; diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index 523b4e65efc6d..c539de7751dcc 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -4988,12 +4988,12 @@ class RGWCollectBucketSyncStatusCR : public RGWShardCollectCR { } }; -int rgw_bucket_sync_status(const DoutPrefixProvider *dpp, - rgw::sal::RadosStore* store, - const rgw_sync_bucket_pipe& pipe, - const RGWBucketInfo& dest_bucket_info, - const RGWBucketInfo *psource_bucket_info, - std::vector *status) +int rgw_read_bucket_inc_sync_status(const DoutPrefixProvider *dpp, + rgw::sal::RadosStore *store, + const rgw_sync_bucket_pipe& pipe, + const RGWBucketInfo& dest_bucket_info, + const RGWBucketInfo *psource_bucket_info, + std::vector *status) { if (!pipe.source.zone || !pipe.source.bucket || diff --git a/src/rgw/rgw_data_sync.h b/src/rgw/rgw_data_sync.h index 43ca47126d4df..5b26c7ebe5c06 100644 --- a/src/rgw/rgw_data_sync.h +++ b/src/rgw/rgw_data_sync.h @@ -674,13 +674,13 @@ public: int run(const DoutPrefixProvider *dpp); }; -/// read the sync status of all bucket shards from the given source zone -int rgw_bucket_sync_status(const DoutPrefixProvider *dpp, - rgw::sal::RadosStore* store, - const rgw_sync_bucket_pipe& pipe, - const RGWBucketInfo& dest_bucket_info, - const RGWBucketInfo *psource_bucket_info, - std::vector *status); +/// read the incremental sync status of all bucket shards from the given source zone +int rgw_read_bucket_inc_sync_status(const DoutPrefixProvider *dpp, + rgw::sal::RadosStore *store, + const rgw_sync_bucket_pipe& pipe, + const RGWBucketInfo& dest_bucket_info, + const RGWBucketInfo *psource_bucket_info, + std::vector *status); class RGWDefaultSyncModule : public RGWSyncModule { public: diff --git a/src/rgw/rgw_rest_log.cc b/src/rgw/rgw_rest_log.cc index f2105f85f0f72..8d19d5442753b 100644 --- a/src/rgw/rgw_rest_log.cc +++ b/src/rgw/rgw_rest_log.cc @@ -860,7 +860,8 @@ void RGWOp_BILog_Status::execute(optional_yield y) ldpp_dout(this, 20) << "RGWOp_BILog_Status::execute(optional_yield y): getting sync status for pipe=" << pipe << dendl; - op_ret = rgw_bucket_sync_status(this, static_cast(store), pipe, bucket->get_info(), nullptr, &status); + op_ret = rgw_read_bucket_inc_sync_status(this, static_cast(store), + pipe, bucket->get_info(), nullptr, &status); if (op_ret < 0) { ldpp_dout(this, -1) << "ERROR: rgw_bucket_sync_status() on pipe=" << pipe << " returned ret=" << op_ret << dendl; @@ -909,7 +910,8 @@ void RGWOp_BILog_Status::execute(optional_yield y) pipe.dest.bucket = pinfo->bucket; } - int r = rgw_bucket_sync_status(this, static_cast(store), pipe, *pinfo, &bucket->get_info(), ¤t_status); + int r = rgw_read_bucket_inc_sync_status(this, static_cast(store), + pipe, *pinfo, &bucket->get_info(), ¤t_status); if (r < 0) { ldpp_dout(this, -1) << "ERROR: rgw_bucket_sync_status() on pipe=" << pipe << " returned ret=" << r << dendl; op_ret = r; diff --git a/src/rgw/rgw_sync_checkpoint.cc b/src/rgw/rgw_sync_checkpoint.cc index ec55eca4adf95..905fbc0df334a 100644 --- a/src/rgw/rgw_sync_checkpoint.cc +++ b/src/rgw/rgw_sync_checkpoint.cc @@ -99,8 +99,8 @@ int bucket_source_sync_checkpoint(const DoutPrefixProvider* dpp, std::vector status; status.resize(std::max(1, num_shards)); - int r = rgw_bucket_sync_status(dpp, store, pipe, bucket_info, - &source_bucket_info, &status); + int r = rgw_read_bucket_inc_sync_status(dpp, store, pipe, bucket_info, + &source_bucket_info, &status); if (r < 0) { return r; } @@ -115,7 +115,8 @@ int bucket_source_sync_checkpoint(const DoutPrefixProvider* dpp, << " local status: " << status << '\n' << " remote markers: " << remote_markers << dendl; std::this_thread::sleep_until(delay_until); - r = rgw_bucket_sync_status(dpp, store, pipe, bucket_info, &source_bucket_info, &status); + r = rgw_read_bucket_inc_sync_status(dpp, store, pipe, bucket_info, + &source_bucket_info, &status); if (r < 0) { return r; } -- 2.39.5