void decode_json(JSONObj *obj);
- RGWBucketInfo() : flags(0), creation_time(0), has_instance_obj(false) {}
+ RGWBucketInfo() : flags(0), creation_time(0), has_instance_obj(false), bucket_index_shard_hash_type(MOD) {}
};
WRITE_CLASS_ENCODER(RGWBucketInfo)
encode_json("has_instance_obj", has_instance_obj, f);
encode_json("quota", quota, f);
encode_json("num_shards", num_shards, f);
+ encode_json("bi_shard_hash_type", (uint32_t)bucket_index_shard_hash_type, f);
}
void RGWBucketInfo::decode_json(JSONObj *obj) {
JSONDecoder::decode_json("has_instance_obj", has_instance_obj, obj);
JSONDecoder::decode_json("quota", quota, obj);
JSONDecoder::decode_json("num_shards", num_shards, obj);
+ uint32_t hash_type;
+ JSONDecoder::decode_json("bi_shard_hash_type", hash_type, obj);
+ bucket_index_shard_hash_type = (uint8_t)hash_type;
}
void RGWObjEnt::dump(Formatter *f) const
if (ret < 0)
return ret;
- get_bucket_index_object(bucket_oid_base, obj_key, binfo.num_shards,
- (RGWBucketInfo::BIShardsHashType)binfo.bucket_index_shard_hash_type, bucket_obj, shard_id);
+ ret = get_bucket_index_object(bucket_oid_base, obj_key, binfo.num_shards,
+ (RGWBucketInfo::BIShardsHashType)binfo.bucket_index_shard_hash_type, bucket_obj, shard_id);
+ if (ret < 0) {
+ ldout(cct, 10) << "get_bucket_index_object() returned ret=" << ret << dendl;
+ }
return 0;
}