From: Vedansh Bhartia Date: Thu, 29 Jun 2023 10:18:22 +0000 (+0530) Subject: rgw: Init res id with cls_2pc_reservation::NO_ID X-Git-Tag: v19.0.0~826^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=362f1231b972aaae73c3dbd03b8bf59a32651432;p=ceph.git rgw: Init res id with cls_2pc_reservation::NO_ID rgw_notify.cc did not initialize res_id for non-persistent topics. Although it was not required for non-persistent topics, it might cause an issue when a topic is changed from non-persistent to persistent between "reserve" and "commit". Signed-off-by: Vedansh Bhartia --- diff --git a/src/rgw/driver/rados/rgw_notify.cc b/src/rgw/driver/rados/rgw_notify.cc index b1835016ec0..dffd88e557b 100644 --- a/src/rgw/driver/rados/rgw_notify.cc +++ b/src/rgw/driver/rados/rgw_notify.cc @@ -810,7 +810,7 @@ static inline bool notification_match(reservation_t& res, "' (unique topic: '" << topic_cfg.name << "') apply to event of type: '" << to_string(event_type) << "'" << dendl; - cls_2pc_reservation::id_t res_id; + cls_2pc_reservation::id_t res_id = cls_2pc_reservation::NO_ID; if (topic_cfg.dest.persistent) { // TODO: take default reservation size from conf constexpr auto DEFAULT_RESERVATION = 4*1024U; // 4K