From c8e07379b076982f95274a43e46d4c14c986f0cb Mon Sep 17 00:00:00 2001 From: "lu.shasha" Date: Mon, 10 Jul 2017 16:14:55 +0800 Subject: [PATCH] rgw:multisite: clean up RGWRemoteDataLog unused function 'RGWRemoteDataLog::get_shard_info' function not used, drop it Signed-off-by: Shasha Lu --- src/rgw/rgw_data_sync.cc | 22 ---------------------- src/rgw/rgw_data_sync.h | 1 - 2 files changed, 23 deletions(-) diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index a7cfd5c5873..5090ba1333a 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -635,28 +635,6 @@ void RGWRemoteDataLog::finish() stop(); } -int RGWRemoteDataLog::get_shard_info(int shard_id) -{ - char buf[32]; - snprintf(buf, sizeof(buf), "%d", shard_id); - - rgw_http_param_pair pairs[] = { { "type", "data" }, - { "id", buf }, - { "info", NULL }, - { NULL, NULL } }; - - RGWDataChangesLogInfo info; - int ret = sync_env.conn->get_json_resource("/admin/log", pairs, info); - if (ret < 0) { - ldout(store->ctx(), 0) << "ERROR: failed to fetch datalog info" << dendl; - return ret; - } - - ldout(store->ctx(), 20) << "remote datalog, shard_id=" << shard_id << " marker=" << info.marker << dendl; - - return 0; -} - int RGWRemoteDataLog::read_sync_status(rgw_data_sync_status *sync_status) { // cannot run concurrently with run_sync(), so run in a separate manager diff --git a/src/rgw/rgw_data_sync.h b/src/rgw/rgw_data_sync.h index 00e09447455..934f3f322c4 100644 --- a/src/rgw/rgw_data_sync.h +++ b/src/rgw/rgw_data_sync.h @@ -262,7 +262,6 @@ public: int read_log_info(rgw_datalog_info *log_info); int read_source_log_shards_info(map *shards_info); int read_source_log_shards_next(map shard_markers, map *result); - int get_shard_info(int shard_id); int read_sync_status(rgw_data_sync_status *sync_status); int init_sync_status(int num_shards); int run_sync(int num_shards);