Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw: json encode/decode index_type, allow modification #11707

Merged
merged 1 commit into from Nov 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion src/rgw/rgw_bucket.cc
Expand Up @@ -2150,7 +2150,6 @@ class RGWBucketInstanceMetadataHandler : public RGWMetadataHandler {
bci.info.bucket.data_pool = old_bci.info.bucket.data_pool;
bci.info.bucket.index_pool = old_bci.info.bucket.index_pool;
bci.info.bucket.data_extra_pool = old_bci.info.bucket.data_extra_pool;
bci.info.index_type = old_bci.info.index_type;
}

// are we actually going to perform this put, or is it too old?
Expand Down
4 changes: 4 additions & 0 deletions src/rgw/rgw_json_enc.cc
Expand Up @@ -694,6 +694,7 @@ void RGWBucketInfo::dump(Formatter *f) const
}
encode_json("swift_versioning", swift_versioning, f);
encode_json("swift_ver_location", swift_ver_location, f);
encode_json("index_type", (uint32_t)index_type, f);
}

void RGWBucketInfo::decode_json(JSONObj *obj) {
Expand Down Expand Up @@ -722,6 +723,9 @@ void RGWBucketInfo::decode_json(JSONObj *obj) {
}
JSONDecoder::decode_json("swift_versioning", swift_versioning, obj);
JSONDecoder::decode_json("swift_ver_location", swift_ver_location, obj);
uint32_t it;
JSONDecoder::decode_json("index_type", it, obj);
index_type = (RGWBucketIndexType)it;
}

void rgw_obj_key::dump(Formatter *f) const
Expand Down