int get_zonegroup(RGWZoneGroup& zonegroup,
const string& zonegroup_id);
- bool is_single_zonegroup(CephContext *cct, RGWRados *store);
+ bool is_single_zonegroup()
+ {
+ return (period_map.zonegroups.size() == 1);
+ }
+
+ /*
+ returns true if there are several zone groups with a least one zone
+ */
+ bool is_multi_zonegroups_with_zones()
+ {
+ int count = 0;
+ for (const auto& zg: period_map.zonegroups) {
+ if (zg.second.zones.size() > 0) {
+ if (count++ > 0) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
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);
+ // update latest_epoch if the given epoch is higher, else return -EEXIST
+ int update_latest_epoch(epoch_t epoch);
int init(CephContext *_cct, RGWRados *_store, const string &period_realm_id, const string &period_realm_name = "",
bool setup_obj = true);