Created
September 2, 2020 18:21
-
-
Save cbodley/b6ccd16cda693cdb23864cfb334f90b0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void encode(ceph::buffer::list& bl) const { | |
| - ENCODE_START(1, 1, bl); | |
| + ENCODE_START(2, 1, bl); | |
| encode((uint8_t)reshard_status, bl); | |
| - encode(new_bucket_instance_id, bl); | |
| - encode(num_shards, bl); | |
| ENCODE_FINISH(bl); | |
| } | |
| void decode(ceph::buffer::list::const_iterator& bl) { | |
| - DECODE_START(1, bl); | |
| + DECODE_START(2, bl); | |
| uint8_t s; | |
| decode(s, bl); | |
| reshard_status = (cls_rgw_reshard_status)s; | |
| - decode(new_bucket_instance_id, bl); | |
| - decode(num_shards, bl); | |
| + if (struct_v < 2) { // decode fields removed from version 1 | |
| + std::string new_bucket_instance_id; | |
| + decode(new_bucket_instance_id, bl); | |
| + int32_t num_shards; | |
| + decode(num_shards, bl); | |
| + } | |
| DECODE_FINISH(bl); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment