[
https://issues.apache.org/jira/browse/CASSANDRA-14092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16338130#comment-16338130
]
Randy Fradin commented on CASSANDRA-14092:
------------------------------------------
Copying/paraphrasing my recent comment from CASSANDRA-4771 here:
It looks like local deletion time is encoded per cell as an offset in seconds
from the minimum local deletion time in the SSTable. If I'm reading it right
the offset is serialized as a variable length integer, so reading it into a
long instead of an int would give a very large range of offsets that would be
more than sufficient. However it looks to me like the minimum local deletion
time at the SSTable metadata level is saved as a fixed-size 4-bytes and
de-serialized into a (signed) int. Without changing the serialization format we
could change the interpretation of that metadata field to assume it is an
unsigned integer (and de-serialize it also into a long variable instead of an
int) which should give us another 68 years. A better fix would probably be to
also change the serialization format of minLocalDeletionTime in the metadata to
an 8 byte integer or a variable size integer so it could hold values in the far
far future. Changing the SSTable format might be a 4.0+ thing though. Either
way the in-memory representation of local delete time would become a long not
an int.
I haven't yet looked at what if anything this means for the inter-node wire
format between coordinator and replica, that might be a complicating factor ifÂ
this is a breaking change to the format.
> 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]