]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/lc: Fix a bug in LCOpAction_Transition::check() 61532/head
authorSoumya Koduri <skoduri@redhat.com>
Fri, 27 Sep 2024 07:42:56 +0000 (13:12 +0530)
committerSoumya Koduri <skoduri@redhat.com>
Sun, 26 Jan 2025 18:35:31 +0000 (00:05 +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>
(cherry picked from commit a2b2eac03677687d0c9b2d8b16fb0d52a4ea7d9a)

src/rgw/rgw_lc.h

index 162b839efea724dac8545f635f1c67573c62a9b3..75244be9a3af17780db9ecb8da13b97f0f47ea3b 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);