From: Casey Bodley Date: Mon, 18 Feb 2019 23:15:11 +0000 (-0500) Subject: rgw: fix rgw_data_sync_info::json_decode() X-Git-Tag: v14.1.0~39^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2b51d52bab2bd95834524316d5e71ff362aa0507;p=ceph.git rgw: fix rgw_data_sync_info::json_decode() this was trying to decode a 'uint64_t instance_id' into the wrong variable 'uint32_t num_shards' datalog trimming relies on this json format, and decode failures here prevent any trimming from taking place Fixes: http://tracker.ceph.com/issues/38373 Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_data_sync.h b/src/rgw/rgw_data_sync.h index cf236f49061c..1688875dd958 100644 --- a/src/rgw/rgw_data_sync.h +++ b/src/rgw/rgw_data_sync.h @@ -86,7 +86,7 @@ struct rgw_data_sync_info { state = StateInit; } JSONDecoder::decode_json("num_shards", num_shards, obj); - JSONDecoder::decode_json("instance_id", num_shards, obj); + JSONDecoder::decode_json("instance_id", instance_id, obj); } static void generate_test_instances(std::list& o);