From: Casey Bodley Date: Mon, 8 Feb 2016 20:03:05 +0000 (-0500) Subject: rgw: remove unused RGWRemoteMetaLog::list_shards X-Git-Tag: v10.1.0~354^2~27 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=be06128bfe910ea2eff18f5a271b885aff54fa56;p=ceph.git rgw: remove unused RGWRemoteMetaLog::list_shards Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_sync.cc b/src/rgw/rgw_sync.cc index 7154c1cd68fb..48a17ce2a179 100644 --- a/src/rgw/rgw_sync.cc +++ b/src/rgw/rgw_sync.cc @@ -205,71 +205,6 @@ void RGWRemoteMetaLog::finish() stop(); } -int RGWRemoteMetaLog::list_shards(int num_shards) -{ - for (int i = 0; i < (int)num_shards; i++) { - int ret = list_shard(i); - if (ret < 0) { - ldout(store->ctx(), 10) << "failed to list shard: ret=" << ret << dendl; - } - } - - return 0; -} - -int RGWRemoteMetaLog::list_shard(int shard_id) -{ - conn = store->rest_master_conn; - - char buf[32]; - snprintf(buf, sizeof(buf), "%d", shard_id); - - rgw_http_param_pair pairs[] = { { "type", "metadata" }, - { "id", buf }, - { NULL, NULL } }; - - rgw_mdlog_shard_data data; - int ret = conn->get_json_resource("/admin/log", pairs, data); - if (ret < 0) { - ldout(store->ctx(), 0) << "ERROR: failed to fetch mdlog data" << dendl; - return ret; - } - - ldout(store->ctx(), 20) << "remote mdlog, shard_id=" << shard_id << " num of shard entries: " << data.entries.size() << dendl; - - vector::iterator iter; - for (iter = data.entries.begin(); iter != data.entries.end(); ++iter) { - rgw_mdlog_entry& entry = *iter; - ldout(store->ctx(), 20) << "entry: name=" << entry.name << dendl; - } - - return 0; -} - -int RGWRemoteMetaLog::get_shard_info(int shard_id) -{ - conn = store->rest_master_conn; - - char buf[32]; - snprintf(buf, sizeof(buf), "%d", shard_id); - - rgw_http_param_pair pairs[] = { { "type", "metadata" }, - { "id", buf }, - { "info", NULL }, - { NULL, NULL } }; - - RGWMetadataLogInfo info; - int ret = conn->get_json_resource("/admin/log", pairs, info); - if (ret < 0) { - ldout(store->ctx(), 0) << "ERROR: failed to fetch mdlog info" << dendl; - return ret; - } - - ldout(store->ctx(), 20) << "remote mdlog, shard_id=" << shard_id << " marker=" << info.marker << dendl; - - return 0; -} - #define CLONE_MAX_ENTRIES 100 int RGWMetaSyncStatusManager::init() diff --git a/src/rgw/rgw_sync.h b/src/rgw/rgw_sync.h index 29c5942b26be..9d4ba49ee457 100644 --- a/src/rgw/rgw_sync.h +++ b/src/rgw/rgw_sync.h @@ -172,9 +172,6 @@ public: void finish(); int read_log_info(rgw_mdlog_info *log_info); - int list_shard(int shard_id); - int list_shards(int num_shards); - int get_shard_info(int shard_id); int fetch(int num_shards, vector& clone_markers); int read_sync_status(rgw_meta_sync_status *sync_status); int init_sync_status(int num_shards);