]> git.apps.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>
Mon, 18 Feb 2019 23:47:22 +0000 (18:47 -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>
src/rgw/rgw_data_sync.h

index cf236f49061ca203070d8654e21b6f1f561eac6d..1688875dd9581bac9ff96740316fafb7485056f6 100644 (file)
@@ -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<rgw_data_sync_info*>& o);