From 063c949d4409a18a22b64791d497e20f7473bc01 Mon Sep 17 00:00:00 2001 From: Abhishek Lekshmanan Date: Fri, 13 Jan 2017 16:29:47 +0100 Subject: [PATCH] rgw: allow getting master log shards info on specified period This is needed for rgw admin's sync status or else we end up always publishing that we're behind since we are always checking against master's first period to sync from Signed-off-by: Abhishek Lekshmanan --- src/rgw/rgw_sync.cc | 6 ++---- src/rgw/rgw_sync.h | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/rgw/rgw_sync.cc b/src/rgw/rgw_sync.cc index c44305edf33..0e5a6e10597 100644 --- a/src/rgw/rgw_sync.cc +++ b/src/rgw/rgw_sync.cc @@ -244,7 +244,7 @@ int RGWRemoteMetaLog::read_log_info(rgw_mdlog_info *log_info) return 0; } -int RGWRemoteMetaLog::read_master_log_shards_info(string *master_period, map *shards_info) +int RGWRemoteMetaLog::read_master_log_shards_info(const string &master_period, map *shards_info) { if (store->is_meta_master()) { return 0; @@ -256,9 +256,7 @@ int RGWRemoteMetaLog::read_master_log_shards_info(string *master_period, map shard_markers, map *result) diff --git a/src/rgw/rgw_sync.h b/src/rgw/rgw_sync.h index 298cd4ed4b5..5ae136f85ca 100644 --- a/src/rgw/rgw_sync.h +++ b/src/rgw/rgw_sync.h @@ -212,7 +212,7 @@ public: void finish(); int read_log_info(rgw_mdlog_info *log_info); - int read_master_log_shards_info(string *master_period, map *shards_info); + int read_master_log_shards_info(const string& master_period, map *shards_info); int read_master_log_shards_next(const string& period, map shard_markers, map *result); int read_sync_status(); int init_sync_status(); @@ -268,7 +268,7 @@ public: int read_log_info(rgw_mdlog_info *log_info) { return master_log.read_log_info(log_info); } - int read_master_log_shards_info(string *master_period, map *shards_info) { + int read_master_log_shards_info(const string& master_period, map *shards_info) { return master_log.read_master_log_shards_info(master_period, shards_info); } int read_master_log_shards_next(const string& period, map shard_markers, map *result) {