From a3b8767d7ba8f34ff6790fb9a172e3101bb5fa3f Mon Sep 17 00:00:00 2001 From: Or Friedmann Date: Tue, 27 Aug 2019 23:52:33 +0300 Subject: [PATCH] Add days0 to rgw lc transition Currently lc does not get days 0 for transition, but by aws s3 spec it should Fixes: https://tracker.ceph.com/issues/38389 Signed-off-by: Or Friedmann --- src/rgw/rgw_lc.cc | 2 +- src/rgw/rgw_lc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index b9702318d924a..8cecf0feb6f36 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -863,7 +863,7 @@ public: auto mtime = get_effective_mtime(oc); bool is_expired; - if (transition.days <= 0) { + if (transition.days < 0) { if (transition.date == boost::none) { ldout(oc.cct, 20) << __func__ << "(): key=" << o.key << ": no transition day/date set in rule, skipping" << dendl; return false; diff --git a/src/rgw/rgw_lc.h b/src/rgw/rgw_lc.h index 8956cc9447f2d..734132bfe76ff 100644 --- a/src/rgw/rgw_lc.h +++ b/src/rgw/rgw_lc.h @@ -130,7 +130,7 @@ public: bool valid() const { if (!days.empty() && !date.empty()) { return false; - } else if (!days.empty() && get_days() <=0) { + } else if (!days.empty() && get_days() < 0) { return false; } //We've checked date in xml parsing -- 2.39.5