From: Soumya Koduri Date: Fri, 27 Sep 2024 07:42:56 +0000 (+0530) Subject: rgw/lc: Fix a bug in LCOpAction_Transition::check() X-Git-Tag: v20.0.0~893^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=a2b2eac03677687d0c9b2d8b16fb0d52a4ea7d9a;p=ceph.git rgw/lc: Fix a bug in LCOpAction_Transition::check() transition.days should be initialized to -1 by default to be able to correctly process the LC rules which may have `Date` specified. Fixes: https://tracker.ceph.com/issues/68288 Signed-off-by: Soumya Koduri --- diff --git a/src/rgw/rgw_lc.h b/src/rgw/rgw_lc.h index b4c6ad4a86b7c..cc6a7e51a1d14 100644 --- a/src/rgw/rgw_lc.h +++ b/src/rgw/rgw_lc.h @@ -469,7 +469,7 @@ struct transition_action int days; boost::optional date; std::string storage_class; - transition_action() : days(0) {} + transition_action() : days(-1) {} void dump(Formatter *f) const { if (!date) { f->dump_int("days", days);