[ 
https://issues.apache.org/jira/browse/CASSANDRA-14092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16359943#comment-16359943
 ] 

Paulo Motta commented on CASSANDRA-14092:
-----------------------------------------

{quote}I tend to agree with you. Even if adding another file is less than 
ideal, it's probably better than adding a large, unchanging header as that's 
likely just going to lead to more users not properly reading it and missing 
critical info about other future upgrades. So I'd be +1 on adding a new file 
(CASSANDRA-14092.txt maybe?) and just a brief explanation of the severity of 
the issue plus a very clear pointer to more detailed file at the top of 
NEWS.txt.
{quote}
Sounds good. Settled on this (not-so) summarized note for NEWS.txt (the full 
text goes on CASSANDRA-14092.txt):
{noformat}
PLEASE READ: MAXIMUM TTL EXPIRATION DATE NOTICE (CASSANDRA-14092)
------------------------------------------------------------------
(General upgrading instructions are available in the next section)

The maximum expiration timestamp that can be represented by the storage engine 
is
2038-01-19T03:14:06+00:00, which means that inserts with TTL thatl expire after
this date are not currently supported. By default, INSERTS with TTL exceeding 
the
maximum supported date are rejected, but it's possible to choose a different
 expiration overflow policy. See CASSANDRA]-14092.txt for more details.

Prior to 3.0.16 (3.0.X) and 3.11.2 (3.11.x) there was no protection against 
INSERTS
with TTL expiring after the maximum supported date, causing the expiration time
field to overflow and the records to expire immediately. Clusters in the 2.X and
lower series are not subject to this when assertions are enabled. Backed up 
SSTables
can be potentially recovered and recovery instructions can be found on the
CASSANDRA-14092.txt file.

If you use or plan to use very large TTLS (10 to 20 years), read 
CASSANDRA-14092.txt
for more information.
{noformat}

{quote}Extracting the news text to a new file notwithstanding, I'm +1 on the 
latest patches (pending CI, of course).
{quote}
Still had to fix a couple of test nits and resubmit tests after rebase to get a 
clean run (attached internal CI screenshots, verified other failures and they 
look unrelated).

I've added the new CASSANDRA-14092.txt file to the debian/redhat package 
manifests 
[here|https://github.com/apache/cassandra/commit/a25898253ea3b5bc7262ff2d17f8466d489eaf96]
 (thanks [~mshuler] for the help).

Committed as {{b2949439ec62077128103540e42570238520f4ee}} to cassandra-2.1 and 
merged up to cassandra-2.2, cassandra-3.0, cassandra-3.11 and master (phew). 
cassandra-dtest commit merged as {{781c4ecdf67bb63f508e8af70599b45b896c28ae}}.

I've kept the previous branches with separate commits, and created a new branch 
with the squashed + rebased version:
||2.1||2.2||3.0||3.11||trunk||dtest||
|[branch|https://github.com/apache/cassandra/compare/cassandra-2.1...pauloricardomg:2.1-14092-final]|[branch|https://github.com/apache/cassandra/compare/cassandra-2.2...pauloricardomg:2.2-14092-final]|[branch|https://github.com/apache/cassandra/compare/cassandra-3.0...pauloricardomg:3.0-14092-final]|[branch|https://github.com/apache/cassandra/compare/cassandra-3.11...pauloricardomg:3.11-14092-final]|[branch|https://github.com/apache/cassandra/compare/trunk...pauloricardomg:trunk-14092-final]|[branch|https://github.com/apache/cassandra-dtest/compare/master...pauloricardomg:14092-rebased]|

I will open follow-up tickets to fix this limitation permanently and add the 
expiration overflow notice to the docs.

Thanks for all who helped with feedback and Sam for kindly reviewing this.

> 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
>            Assignee: Paulo Motta
>            Priority: Blocker
>             Fix For: 2.1.20, 2.2.12, 3.0.16, 3.11.2
>
>         Attachments: 2.1-14092-dtest.png, 2.1-14092-testall.png, 
> 2.2-14092-dtest.png, 2.2-14092-testall.png, 3.0-14092-dtest.png, 
> 3.0-14092-testall.png, 3.11-14092-dtest.png, 3.11-14092-testall.png, 
> trunk-14092-dtest.png, trunk-14092-testall.png
>
>
> 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: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to