[
https://issues.apache.org/jira/browse/CASSANDRA-14092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16340499#comment-16340499
]
Paulo Motta commented on CASSANDRA-14092:
-----------------------------------------
The patch below [reduces the maximum allowed
TTL|https://github.com/apache/cassandra/commit/6e66a4730a6f606fe1bb609ba4d8ec650877605e]
from 20 years to 15 years to prevent integer overflow on the
{{localDeletionTime}} field what causes inserts with TTL close to the current
maximum of 20 years to fail with AssertionError on 2.1 and expire as soon as
they are inserted on 3.0, as discussed on the [mailing list
thread|https://www.mail-archive.com/[email protected]/msg11888.html].This
is just an immediate measure to prevent data loss on 3.0+ while we look for a
more permanent solution to raise this limitation.
In addition to lowering the max default TTL, this patch also [adds ability to
scrub to detect and fix
rows/cels|https://github.com/apache/cassandra/commit/d9bbb7992696a02ccc490229280894f0437ae0b7]
with overflowed {{localDeletionTime}} which were not yet turned into
tombstones by compaction and detect rows which were already turned into
tombstones to allow operators to identify which rows were affected.
Furthermore, I [modified the compaction
purger|https://github.com/apache/cassandra/commit/ac04a4199947d41962c34bce07d9aad4ebf87e47]
to not purge rows with overflowed localDeletionTime to allow them to be fixed
via scrub.
This is ready for a initial round of review, but I will still add some tests
for scrub and a more detailed NEWS.txt entry.
||2.1||3.0||
|[branch|https://github.com/apache/cassandra/compare/cassandra-2.1...pauloricardomg:2.1-14092]|[branch|https://github.com/apache/cassandra/compare/cassandra-3.0...pauloricardomg:3.0-14092]|
> Max ttl of 20 years will overflow localDeletionTime
> ---------------------------------------------------
>
> Key: CASSANDRA-14092
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14092
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Paulo Motta
> Priority: Major
>
> CASSANDRA-4771 added a max value of 20 years for ttl to protect against [year
> 2038 overflow bug|https://en.wikipedia.org/wiki/Year_2038_problem] for
> {{localDeletionTime}}.
> It turns out that next year the {{localDeletionTime}} will start overflowing
> with the maximum ttl of 20 years ({{System.currentTimeMillis() + ttl(20
> years) > Integer.MAX_VALUE}}), so we should remove this limitation.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]