Details
-
Bug
-
Status: Open
-
Low
-
Resolution: Unresolved
-
None
-
None
-
Low
Description
Currently at the trunk (and in all prior versions), we've MAX_TTL value defined as 20 years in seconds, which really isn't 20 years as it currently doesn't account for leap years.
https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/cql3/Attributes.java#L43 /** * If this limit is ever raised, make sure @{@link Integer#MAX_VALUE} is not allowed, * as this is used as a flag to represent expired liveness. * * See {@link org.apache.cassandra.db.LivenessInfo#EXPIRED_LIVENESS_TTL} */ public static final int MAX_TTL = 20 * 365 * 24 * 60 * 60; // 20 years in seconds
Either perform actual date calculation to account for leap years or not call it as "20 years in seconds" as this breaks many code relying on it for playing with dates.
This was originally introduced as part of this commit part of CASSANDRA-4771
Attachments
Issue Links
- is related to
-
CASSANDRA-14227 Extend maximum expiration date
- Resolved