RESTArgs::get_string(s, "period_id", period_id, &period_id);
RESTArgs::get_uint32(s, "epoch", 0, &epoch);
-
- period.set_realm_id(realm_id);
- period.set_id(period_id);
- period.set_epoch(epoch);
-
-
- op_ret = s->penv.cfgstore->read_period(this, y, period_id, epoch, period);
+ op_ret = s->penv.cfgstore->read_period(this, y, period_id, std::nullopt, period);
if (op_ret < 0)
ldpp_dout(this, 5) << "failed to read period" << dendl;
}
auto cct = driver->ctx();
// initialize the period without reading from rados
- s->penv.cfgstore->read_period(this, y,driver->get_zone()->get_current_period_id(), std::nullopt, period);
+ s->penv.cfgstore->read_period(this, y, driver->get_zone()->get_current_period_id(), std::nullopt, period);
// decode the period from input
const auto max_size = cct->_conf->rgw_max_put_param_size;
optional_yield y, rgw::sal::ConfigStore* cfgstore)
{
// try to read the period from rados
- constexpr auto zero_epoch = 0;
period.set_id(period_id);
- period.set_epoch(zero_epoch);
- int r = cfgstore->read_period(dpp, y, period_id, zero_epoch, period);
+ int r = cfgstore->read_period(dpp, y, period_id, std::nullopt, period);
if (r < 0) {
if (svc.zone->is_meta_master()) {
// can't pull if we're the master
found = false;
- string period_id;
- epoch_t epoch = 0;
-
- RGWPeriod period(period_id, epoch);
- int r = cfgstore->read_period(dpp, y, period_id, epoch, period);
+ RGWPeriod period;
+ int r = cfgstore->read_period(dpp, y, current_period, std::nullopt, period);
if (r < 0) {
ldpp_dout(dpp, 0) << "WARNING: period init failed: " << cpp_strerror(-r) << " ... skipping" << dendl;
return r;