From a2b2eac03677687d0c9b2d8b16fb0d52a4ea7d9a Mon Sep 17 00:00:00 2001 From: Soumya Koduri Date: Fri, 27 Sep 2024 13:12:56 +0530 Subject: [PATCH] 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 --- src/rgw/rgw_lc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_lc.h b/src/rgw/rgw_lc.h index b4c6ad4a86b..cc6a7e51a1d 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); -- 2.47.3