[
https://issues.apache.org/jira/browse/CASSANDRA-20561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jon Meredith updated CASSANDRA-20561:
-------------------------------------
Attachment: ci_summary_4.0.html
> Updating a column with a new TTL but same expiration time is
> non-deterministic and causes repair mismatches.
> ------------------------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-20561
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20561
> Project: Apache Cassandra
> Issue Type: Bug
> Components: Local/Compaction
> Reporter: Jon Meredith
> Assignee: Jon Meredith
> Priority: Normal
> Fix For: 4.0.x, 4.1.x, 5.0.x, 5.x
>
> Attachments: ci_summary_4.0.html, ci_summary_4.1.html,
> ci_summary_5.0.html, ci_summary_trunk.html
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> If columns written with TTLs are rewritten with a different TTL but the same
> expiration time, merging them is non-deterministic leading to preview repair
> mismatches and inability to repair them.
> One way this can happen is if data with TTLs was migrated from a source table
> to a new table by retrieving the original write time and TTL
> {code}
> SELECT TTL(col), WRITETIME(col) from src
> {code}
> And then inserted into a new table with
> {code}
> INSERT INTO dst(col) VALUES (?) USING TTL ? AND TIMESTAMP ?
> {code}
> Expiry time is calculated by adding the current time (not the supplied
> timestamp) to the returned {{TTL()}} value which will give the same expired
> time assuming the INSERT completes in the same second.
> TTL is not currently considered when reconciling partitions/cell liveness
> when the local deletion times and values are equal and is determined by the
> order cells are input to reconciliation. Different merge orders mean replicas
> have different TTL values which are detected and reported as preview repair
> mismatches.
> The fix is to make resolving partition LivenessInfo and regular cell
> resolution deterministically handle the case there the expiration timestamps
> match but the TTLs are different. Select the lower TTLd value will pick the
> most recent write which probably matches user intent for the migration case
> and persist that value in the ttl field serialized to the sstable.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]