mirror of
https://github.com/ceph/ceph
synced 2025-01-02 09:02:34 +00:00
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 <abhishek@suse.com>
This commit is contained in:
parent
4ca18df719
commit
063c949d44
@ -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<int, RGWMetadataLogInfo> *shards_info)
|
||||
int RGWRemoteMetaLog::read_master_log_shards_info(const string &master_period, map<int, RGWMetadataLogInfo> *shards_info)
|
||||
{
|
||||
if (store->is_meta_master()) {
|
||||
return 0;
|
||||
@ -256,9 +256,7 @@ int RGWRemoteMetaLog::read_master_log_shards_info(string *master_period, map<int
|
||||
return ret;
|
||||
}
|
||||
|
||||
*master_period = log_info.period;
|
||||
|
||||
return run(new RGWReadRemoteMDLogInfoCR(&sync_env, log_info.period, log_info.num_shards, shards_info));
|
||||
return run(new RGWReadRemoteMDLogInfoCR(&sync_env, master_period, log_info.num_shards, shards_info));
|
||||
}
|
||||
|
||||
int RGWRemoteMetaLog::read_master_log_shards_next(const string& period, map<int, string> shard_markers, map<int, rgw_mdlog_shard_data> *result)
|
||||
|
@ -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<int, RGWMetadataLogInfo> *shards_info);
|
||||
int read_master_log_shards_info(const string& master_period, map<int, RGWMetadataLogInfo> *shards_info);
|
||||
int read_master_log_shards_next(const string& period, map<int, string> shard_markers, map<int, rgw_mdlog_shard_data> *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<int, RGWMetadataLogInfo> *shards_info) {
|
||||
int read_master_log_shards_info(const string& master_period, map<int, RGWMetadataLogInfo> *shards_info) {
|
||||
return master_log.read_master_log_shards_info(master_period, shards_info);
|
||||
}
|
||||
int read_master_log_shards_next(const string& period, map<int, string> shard_markers, map<int, rgw_mdlog_shard_data> *result) {
|
||||
|
Loading…
Reference in New Issue
Block a user