[
https://issues.apache.org/jira/browse/CASSANDRA-3974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13427314#comment-13427314
]
Sylvain Lebresne commented on CASSANDRA-3974:
---------------------------------------------
I'm sorry I'm a little late to the discussion, but I'm not sure I'm a fan of
using the metadata TTL to decide of expiration because:
# It means we use the column timestamp to decide of the expiration. However, we
have been very careful so far to not use the column timestamp as a server side
timestamp. And in particular, the patch assumes the timestamp is in
microseconds, while most clients and CQL actually use microseconds.
# Altering the default TTL is imo more confusing that way, because we are
pretending that altering the TTL will apply to all existing CF and columns,
which itself suggests that if you want to remove everything older than say 1h,
you can switch the TTL to 1h and then change it back right away to some other
much longer value (or 0). But that's not the case, because the new TTL will
only be applied to existing data only when compaction happens. And I really
don't think that user visible behaviors should depends in any way on the timing
of internal operations.
# This requires passing the CFMetadata in lots of places in the code, which
isn't really nice. In particular, we should call isColumnExpiredFromDefaultTTL
pretty much every time DeletionInfo.isDeleted() is called (after all, having an
expired column is exatly the same than having a deleted one), and the current
patch is missing quite a few places.
So I think I do prefer the idea of having the CF TTL just being the default TTL
applied to columns when inserted if they don't have one.
> Per-CF TTL
> ----------
>
> Key: CASSANDRA-3974
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3974
> Project: Cassandra
> Issue Type: New Feature
> Affects Versions: 1.2
> Reporter: Jonathan Ellis
> Assignee: Kirk True
> Priority: Minor
> Fix For: 1.2
>
> Attachments: trunk-3974.txt, trunk-3974v2.txt, trunk-3974v3.txt,
> trunk-3974v4.txt
>
>
> Per-CF TTL would allow compaction optimizations ("drop an entire sstable's
> worth of expired data") that we can't do with per-column.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira