}
auto mdlog = store->meta_mgr->get_log();
+ const auto num_shards = cct->_conf->rgw_md_log_max_shards;
- rgw_meta_sync_status status;
- // XXX: status.state = StateInit?
- status.sync_info.num_shards = cct->_conf->rgw_md_log_max_shards;
+ std::vector<std::string> markers;
+ markers.reserve(num_shards);
// gather the markers for each shard
// TODO: use coroutines to read them in parallel
- for (uint32_t i = 0; i < status.sync_info.num_shards; i++) {
+ for (int i = 0; i < num_shards; i++) {
RGWMetadataLogInfo info;
int r = mdlog->get_info(i, &info);
if (r < 0) {
<< ": " << cpp_strerror(-r) << dendl;
return r;
}
- rgw_meta_sync_marker marker;
- // XXX: marker.state = FullSync?
- std::swap(marker.marker, info.marker);
- // XXX: marker.next_step_marker = ?
- ldout(cct, 15) << "got shard " << i << " marker " << marker.marker << dendl;
- status.sync_markers.emplace(i, std::move(marker));
+ ldout(cct, 15) << "got shard " << i << " marker " << info.marker << dendl;
+ markers.emplace_back(std::move(info.marker));
}
- sync_status = std::move(status);
+ std::swap(sync_status, markers);
return 0;
}
string id;
epoch_t epoch;
string predecessor_uuid;
- rgw_meta_sync_status sync_status;
+ std::vector<std::string> sync_status;
RGWPeriodMap period_map;
RGWPeriodConfig period_config;
string master_zonegroup;
const string& get_realm() const { return realm_id; }
const RGWPeriodMap& get_map() const { return period_map; }
const RGWPeriodConfig& get_config() const { return period_config; }
- const rgw_meta_sync_status& get_sync_status() const { return sync_status; }
+ const std::vector<std::string>& get_sync_status() const { return sync_status; }
const string& get_pool_name(CephContext *cct);
const string& get_latest_epoch_oid();
const string& get_info_oid_prefix();
realm_id = _realm_id;
}
- void set_sync_status(const rgw_meta_sync_status& _sync_status) {
- sync_status = _sync_status;
- }
-
void update(const RGWZoneGroupMap& map);
int get_zonegroup(RGWZoneGroup& zonegroup,