ldout(cct, 20) << __func__ << " realm " << realm.get_id() << " period " << current_period.get_id() << dendl;
// gateway must be in the master zone to commit
if (master_zone != store->get_zone_params().get_id()) {
- lderr(cct) << "period commit sent to zone " << store->get_zone_params().get_id()
+ lderr(cct) << "period commit on zone " << store->get_zone_params().get_id()
<< ", not period's master zone " << master_zone << dendl;
return -EINVAL;
}
realm.notify_new_period(*this);
return 0;
}
- // period must be based on predecessor's current epoch
+ // period must be based on current epoch
if (epoch != current_period.get_epoch()) {
lderr(cct) << "period epoch " << epoch << " does not match "
"predecessor epoch " << current_period.get_epoch() << dendl;
finisher = new Finisher(cct);
finisher->start();
+ period_puller.reset(new RGWPeriodPuller(this));
+ period_history.reset(new RGWPeriodHistory(cct, period_puller.get(),
+ current_period));
+
if (need_watch_notify()) {
ret = init_watch();
if (ret < 0) {
#include "rgw_log.h"
#include "rgw_metadata.h"
#include "rgw_meta_sync_status.h"
+#include "rgw_period_puller.h"
class RGWWatcher;
class SafeTimer;
return current_period.get_config().user_quota;
}
+ // pulls missing periods for period_history
+ std::unique_ptr<RGWPeriodPuller> period_puller;
+ // maintains a connected history of periods
+ std::unique_ptr<RGWPeriodHistory> period_history;
+
RGWMetadataManager *meta_mgr;
RGWDataChangesLog *data_log;