// layout of bucket index objects
rgw::BucketLayout layout;
- // Represents the number of bucket index object shards:
- // - value of 0 indicates there is no sharding (this is by default
- // before this feature is implemented).
- // - value of UINT32_T::MAX indicates this is a blind bucket.
-
// Represents the shard number for blind bucket.
const static uint32_t NUM_SHARDS_BLIND_BUCKET;
// place the multipart .meta object on the same shard as its head object
obj.index_hash_source = mp.get_key();
}
- int ret = store->getRados()->get_target_shard_id(bucket_info.layout.target_index->layout.normal, obj.get_hash_object(), &target_shard_id);
+ ret = store->getRados()->get_target_shard_id(bucket_info.layout.target_index->layout.normal,
+ obj.get_hash_object(), &target_shard_id);
if (ret < 0) {
lderr(store->ctx()) << "ERROR: get_target_shard_id() returned ret=" << ret << dendl;
return ret;
}
{
- RGWBucketReshard br(store, bucket_info, attrs, nullptr);
- ret = br.execute(entry.new_num_shards, max_entries, dpp, false, nullptr,
- nullptr, this);
- if (ret < 0) {
- ldout(store->ctx(), 0) << __func__ <<
- ": Error during resharding bucket " << entry.bucket_name << ":" <<
- cpp_strerror(-ret)<< dendl;
- return ret;
- }
+ RGWBucketReshard br(store, bucket_info, attrs, nullptr);
+ ret = br.execute(entry.new_num_shards, max_entries, dpp, false, nullptr,
+ nullptr, this);
+ if (ret < 0) {
+ ldout(store->ctx(), 0) << __func__ <<
+ ": Error during resharding bucket " << entry.bucket_name << ":" <<
+ cpp_strerror(-ret)<< dendl;
+ return ret;
+ }
- ldout(store->ctx(), 20) << __func__ <<
- " removing reshard queue entry for bucket " << entry.bucket_name <<
- dendl;
+ ldout(store->ctx(), 20) << __func__ <<
+ " removing reshard queue entry for bucket " << entry.bucket_name <<
+ dendl;
- ret = remove(entry);
- if (ret < 0) {
- ldout(cct, 0) << __func__ << ": Error removing bucket " <<
- entry.bucket_name << " from resharding queue: " <<
- cpp_strerror(-ret) << dendl;
- return ret;
- }
+ ret = remove(entry);
+ if (ret < 0) {
+ ldout(cct, 0) << __func__ << ": Error removing bucket " <<
+ entry.bucket_name << " from resharding queue: " <<
+ cpp_strerror(-ret) << dendl;
+ return ret;
+ }
}
finished_entry:
Clock::time_point now = Clock::now();
if (logshard_lock.should_renew(now)) {
- ret = logshard_lock.renew(now);
- if (ret < 0) {
- return ret;
- }
+ ret = logshard_lock.renew(now);
+ if (ret < 0) {
+ return ret;
+ }
}
entry.get_key(&marker);