]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix for uninitialized oldest_gen/latest_gen
authorCasey Bodley <cbodley@redhat.com>
Mon, 18 Oct 2021 18:15:33 +0000 (14:15 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Tue, 1 Feb 2022 22:57:02 +0000 (17:57 -0500)
when data sync queries RGWOp_BILog_Info from an un-upgraded gateway, it
doesn't include the oldest_gen/latest_gen fields. so initialize these
variables to 0 by default

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_data_sync.h

index bc0063e9e0fe1c7190002a6b3c8c56fd718fdca6..6ce22ba8767c6fa8d89f51704f137cc23b737626 100644 (file)
@@ -647,8 +647,8 @@ struct rgw_bucket_index_marker_info {
   std::string master_ver;
   std::string max_marker;
   bool syncstopped{false};
-  uint64_t oldest_gen;
-  uint64_t latest_gen;
+  uint64_t oldest_gen = 0;
+  uint64_t latest_gen = 0;
 
   void decode_json(JSONObj *obj) {
     JSONDecoder::decode_json("bucket_ver", bucket_ver, obj);