From: Abhishek Lekshmanan Date: Fri, 13 Jan 2017 15:29:47 +0000 (+0100) Subject: rgw: allow getting master log shards info on specified period X-Git-Tag: v12.0.0~144^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=063c949d4409a18a22b64791d497e20f7473bc01;p=ceph.git 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 --- diff --git a/src/rgw/rgw_sync.cc b/src/rgw/rgw_sync.cc index c44305edf33c..0e5a6e105970 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 298cd4ed4b55..5ae136f85ca0 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) {