return oss.str();
}
-int RGWPeriod::read_latest_epoch(RGWPeriodLatestEpochInfo& info)
+int RGWPeriod::read_latest_epoch(RGWPeriodLatestEpochInfo& info,
+ RGWObjVersionTracker *objv)
{
string oid = get_period_oid_prefix() + get_latest_epoch_oid();
rgw_pool pool(get_pool(cct));
bufferlist bl;
RGWObjectCtx obj_ctx(store);
- int ret = rgw_get_system_obj(store, obj_ctx, pool, oid, bl, NULL, NULL);
+ int ret = rgw_get_system_obj(store, obj_ctx, pool, oid, bl, objv, nullptr);
if (ret < 0) {
ldout(cct, 1) << "error read_lastest_epoch " << pool << ":" << oid << dendl;
return ret;
return 0;
}
-int RGWPeriod::set_latest_epoch(epoch_t epoch, bool exclusive)
+int RGWPeriod::set_latest_epoch(epoch_t epoch, bool exclusive,
+ RGWObjVersionTracker *objv)
{
string oid = get_period_oid_prefix() + get_latest_epoch_oid();
::encode(info, bl);
return rgw_put_system_obj(store, pool, oid, bl.c_str(), bl.length(),
- exclusive, NULL, real_time(), NULL);
+ exclusive, objv, real_time(), nullptr);
}
int RGWPeriod::delete_obj()
RGWRados *store;
int read_info();
- int read_latest_epoch(RGWPeriodLatestEpochInfo& epoch_info);
+ int read_latest_epoch(RGWPeriodLatestEpochInfo& epoch_info,
+ RGWObjVersionTracker *objv = nullptr);
int use_latest_epoch();
int use_current_period();
bool is_single_zonegroup(CephContext *cct, RGWRados *store);
int get_latest_epoch(epoch_t& epoch);
- int set_latest_epoch(epoch_t epoch, bool exclusive = false);
+ int set_latest_epoch(epoch_t epoch, bool exclusive = false,
+ RGWObjVersionTracker *objv = nullptr);
int init(CephContext *_cct, RGWRados *_store, const string &period_realm_id, const string &period_realm_name = "",
bool setup_obj = true);