Project

General

Profile

Actions

Bug #56993

open

rgw_object_lock.cc:The maximum time of bucket object lock is 24855 days

Added by yuxuan yang almost 2 years ago. Updated 9 months ago.

Status:
Pending Backport
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
Tags:
object-lock low-hanging-fruit backport_processed
Backport:
pacific quincy reef
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
rgw
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

ceph::real_time RGWObjectLock::get_lock_until_date(const ceph::real_time& mtime) const {
if (!rule_exist) {
return ceph::real_time();
}
//if days = 24855,days*60*60*24 will overflow
int days = get_days();
if (days <= 0) {
days = get_years()*365;
}
return mtime + make_timespan(days*24*60*60);
}
Maybe we can replace int with int64_t or uint64_t?
ceph::real_time RGWObjectLock::get_lock_until_date(const ceph::real_time& mtime) const {
if (!rule_exist) {
return ceph::real_time();
}
int64_t days = get_days();
if (days <= 0) {
days = get_years()*365;
}
return mtime + make_timespan(days*24*60*60);
}
like this?


Files

GNDUMG`(]7HPWX3A[2PAS18.png (144 KB) GNDUMG`(]7HPWX3A[2PAS18.png yuxuan yang, 08/05/2022 02:55 AM

Related issues 4 (2 open2 closed)

Related to rgw - Bug #63537: object lock: The query does not match after the worm protection time is set to 2124, 1, 1Pending BackportCasey Bodley

Actions
Copied to rgw - Backport #62137: reef: rgw_object_lock.cc:The maximum time of bucket object lock is 24855 daysResolvedCasey BodleyActions
Copied to rgw - Backport #62138: pacific: rgw_object_lock.cc:The maximum time of bucket object lock is 24855 daysResolvedCasey BodleyActions
Copied to rgw - Backport #62139: quincy: rgw_object_lock.cc:The maximum time of bucket object lock is 24855 daysIn ProgressCasey BodleyActions
Actions

Also available in: Atom PDF