Project

General

Profile

Actions

Bug #42634

closed

rgw: expiration is triggered in advance because of an overflow problem

Added by Jiahui Zeng over 4 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
octopus,nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

I set the lifecycle of a bucket to 30,000 days successfully, and then the expiration is triggered the next day. The objects in that bucket are deleted.

Because the lifecycle was successfully set to xattr, the problem may be in the process of determining whether the object has expired.

There is a variable named cmp in the function obj_has_expired which is used to determine if an object has expired.

cmp = days*24*60*60;

The data type of 'days' is int. When days == 30000, days*24*60*60 exceeds the range of data that int can represent.

In order to avoid this overflow problem caused by large 'days', the result on the right can be represented by a larger data type.


Related issues 2 (0 open2 closed)

Copied to rgw - Backport #48428: nautilus: rgw: expiration is triggered in advance because of an overflow problemResolvedNathan CutlerActions
Copied to rgw - Backport #48429: octopus: rgw: expiration is triggered in advance because of an overflow problemResolvedNathan CutlerActions
Actions #1

Updated by Casey Bodley over 4 years ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 31393
Actions #2

Updated by J. Eric Ivancich over 3 years ago

  • Status changed from Fix Under Review to Pending Backport
  • Backport set to octopus,nautilus
Actions #3

Updated by Nathan Cutler over 3 years ago

  • Copied to Backport #48428: nautilus: rgw: expiration is triggered in advance because of an overflow problem added
Actions #4

Updated by Nathan Cutler over 3 years ago

  • Copied to Backport #48429: octopus: rgw: expiration is triggered in advance because of an overflow problem added
Actions #5

Updated by Nathan Cutler over 3 years ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Actions

Also available in: Atom PDF