]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix rgw_data_sync_info::json_decode()
authorCasey Bodley <cbodley@redhat.com>
Mon, 18 Feb 2019 23:15:11 +0000 (18:15 -0500)
committerCasey Bodley <cbodley@redhat.com>
Tue, 26 Feb 2019 18:08:29 +0000 (13:08 -0500)
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 <cbodley@redhat.com>
(cherry picked from commit 2b51d52bab2bd95834524316d5e71ff362aa0507)

src/rgw/rgw_data_sync.h

index 83f75c925578cb39374f0e03ec9406bafe110bd1..257781316d7fe3b96d52b63d860aa52fc666a649 100644 (file)
@@ -79,7 +79,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<rgw_data_sync_info*>& o);