From a50d6ad12d666dd010e8ede4c1c0f8f77edad1c8 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Mon, 18 Oct 2021 14:15:33 -0400 Subject: [PATCH] rgw: fix for uninitialized oldest_gen/latest_gen 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 --- src/rgw/rgw_data_sync.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_data_sync.h b/src/rgw/rgw_data_sync.h index bc0063e9e0fe1..6ce22ba8767c6 100644 --- a/src/rgw/rgw_data_sync.h +++ b/src/rgw/rgw_data_sync.h @@ -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); -- 2.39.5