cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulo Motta (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-14092) Max ttl of 20 years will overflow localDeletionTime
Date Fri, 26 Jan 2018 02:56:00 GMT


Paulo Motta commented on CASSANDRA-14092:

The patch below [reduces the maximum allowed TTL|]
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|].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|]
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|]
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.

> Max ttl of 20 years will overflow localDeletionTime
> ---------------------------------------------------
>                 Key: CASSANDRA-14092
>                 URL:
>             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|] 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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message