From: Enming.Zhang Date: Wed, 14 Mar 2018 09:53:42 +0000 (+0000) Subject: rgw: some cleanup for sync status X-Git-Tag: v13.1.0~29^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=77800c42fe3d5a068e43fb15cc58ea3d48ded237;p=ceph.git rgw: some cleanup for sync status Signed-off-by: Enming Zhang --- diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index b990fd4f2b46..bc1d39a3637a 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -1958,10 +1958,10 @@ static void get_md_sync_status(list& status) for (auto marker_iter : sync_status.sync_markers) { full_total += marker_iter.second.total_entries; total_shards++; - int shard_id = marker_iter.first; if (marker_iter.second.state == rgw_meta_sync_marker::SyncState::FullSync) { num_full++; full_complete += marker_iter.second.pos; + int shard_id = marker_iter.first; shards_behind_set.insert(shard_id); } else { full_complete += marker_iter.second.total_entries; @@ -1980,13 +1980,6 @@ static void get_md_sync_status(list& status) push_ss(ss, status) << "incremental sync: " << num_inc << "/" << total_shards << " shards"; - rgw_mdlog_info log_info; - ret = sync.read_log_info(&log_info); - if (ret < 0) { - status.push_back(string("failed to fetch local sync status: ") + cpp_strerror(-ret)); - return; - } - map master_shards_info; string master_period = store->get_current_period_id(); @@ -2121,12 +2114,12 @@ static void get_data_sync_status(const string& source_zone, list& status set shards_behind_set; for (auto marker_iter : sync_status.sync_markers) { - int shard_id = marker_iter.first; full_total += marker_iter.second.total_entries; total_shards++; if (marker_iter.second.state == rgw_data_sync_marker::SyncState::FullSync) { num_full++; full_complete += marker_iter.second.pos; + int shard_id = marker_iter.first; shards_behind_set.insert(shard_id); } else { full_complete += marker_iter.second.total_entries; @@ -2144,14 +2137,6 @@ static void get_data_sync_status(const string& source_zone, list& status push_ss(ss, status, tab) << "incremental sync: " << num_inc << "/" << total_shards << " shards"; - rgw_datalog_info log_info; - ret = sync.read_log_info(&log_info); - if (ret < 0) { - push_ss(ss, status, tab) << string("failed to fetch local sync status: ") + cpp_strerror(-ret); - return; - } - - map source_shards_info; ret = sync.read_source_log_shards_info(&source_shards_info);