]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/lc: Fix a bug in LCOpAction_Transition::check() 60020/head
authorSoumya Koduri <skoduri@redhat.com>
Fri, 27 Sep 2024 07:42:56 +0000 (13:12 +0530)
committerSoumya Koduri <skoduri@redhat.com>
Mon, 30 Sep 2024 06:04:00 +0000 (11:34 +0530)
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 <skoduri@redhat.com>
src/rgw/rgw_lc.h

index b4c6ad4a86b7cd65bb25db5c4aa4dfb375e35463..cc6a7e51a1d14da30ae257fcd62bfb941d52634c 100644 (file)
@@ -469,7 +469,7 @@ struct transition_action
   int days;
   boost::optional<ceph::real_time> 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);