int get_zonegroup(RGWZoneGroup& zonegroup,
const string& zonegroup_id);
- bool is_single_zonegroup()
+ bool is_single_zonegroup() const
{
return (period_map.zonegroups.size() == 1);
}
(get_zonegroup().zones.size() > 1 || current_period.is_multi_zonegroups_with_zones());
}
+ bool can_reshard() const {
+ return current_period.get_id().empty() ||
+ (zonegroup.zones.size() == 1 && current_period.is_single_zonegroup());
+ }
+
librados::Rados* get_rados_handle();
int delete_raw_obj_aio(const rgw_raw_obj& obj, list<librados::AioCompletion *>& handles);
int RGWReshard::add(cls_rgw_reshard_entry& entry)
{
+ if (!store->can_reshard()) {
+ ldout(store->ctx(), 20) << __func__ << " Resharding is disabled" << dendl;
+ return 0;
+ }
+
string logshard_oid;
get_bucket_logshard_oid(entry.tenant, entry.bucket_name, &logshard_oid);
int RGWReshard::process_all_logshards()
{
+ if (!store->can_reshard()) {
+ ldout(store->ctx(), 20) << __func__ << " Resharding is disabled" << dendl;
+ return 0;
+ }
int ret = 0;
for (int i = 0; i < num_logshards; i++) {
utime_t last_run;
do {
utime_t start = ceph_clock_now();
- ldout(cct, 2) << "object expiration: start" << dendl;
if (reshard->process_all_logshards()) {
/* All shards have been processed properly. Next time we can start
* from this moment. */
last_run = start;
}
- ldout(cct, 2) << "object expiration: stop" << dendl;
-
if (reshard->going_down())
break;