]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: abort multipart date should be round up to midnight next day like expiration one 36649/head
authorzhangshaowen <zhangshaowen@cmss.chinamobile.com>
Thu, 7 May 2020 11:18:14 +0000 (19:18 +0800)
committerNathan Cutler <ncutler@suse.com>
Sat, 15 Aug 2020 13:01:46 +0000 (15:01 +0200)
Signed-off-by: zhangshaowen <zhangshaowen@cmss.chinamobile.com>
(cherry picked from commit c314d322f8a0fc628f9d19b69491b54a82c069f0)

src/rgw/rgw_lc.cc

index c6a0dd70c5ce7e0ba678682b303d065504d56ae6..d427f16366193ddcb17e9aaba66ecf9b8a364469 100644 (file)
@@ -1999,7 +1999,7 @@ bool s3_multipart_abort_header(
     std::optional<ceph::real_time> rule_abort_date;
     if (mp_expiration.has_days()) {
       rule_abort_date = std::optional<ceph::real_time>(
-              mtime + make_timespan(mp_expiration.get_days()*24*60*60));
+              mtime + make_timespan(mp_expiration.get_days()*24*60*60 - ceph::real_clock::to_time_t(mtime)%(24*60*60) + 24*60*60));
     }
 
     // update earliest abort date