cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-12868) Reject default_time_to_live option when creating or altering MVs
Date Mon, 21 Nov 2016 15:44:58 GMT

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

Sylvain Lebresne commented on CASSANDRA-12868:
----------------------------------------------

Thanks for the patch, which lgtm, though there is no reason not to commit this to 3.0 onwards
so took the liberty to rebase and run the test below (slightly amended the error message fyi):
| [12868-3.0|https://github.com/pcmanus/cassandra/commits/12868-3.0] | [utests|http://cassci.datastax.com/job/pcmanus-12868-3.0-testall]
| [dtests|http://cassci.datastax.com/job/pcmanus-12868-3.0-dtest] |
| [12868-3.X|https://github.com/pcmanus/cassandra/commits/12868-3.X] | [utests|http://cassci.datastax.com/job/pcmanus-12868-3.X-testall]
| [dtests|http://cassci.datastax.com/job/pcmanus-12868-3.X-dtest] |

I'll commit once the test result are in (unless they show a problem obviously).


> Reject default_time_to_live option when creating or altering MVs
> ----------------------------------------------------------------
>
>                 Key: CASSANDRA-12868
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12868
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Srinivasarao Daruna
>            Assignee: Sundar Srinivasan
>            Priority: Minor
>              Labels: lhf
>         Attachments: 12868-trunk.txt
>
>
> Hi,
> By default, materialized views are using the TTL of primary table, irrespective of the
configured value provided in materialized view creation.
> For eg:
> table:
> CREATE TABLE test2(id text, date text, col1 text,col2 text, PRIMARY KEY(id,date)) WITH
default_time_to_live = 60 AND CLUSTERING ORDER BY (date DESC);
> CREATE MATERIALIZED VIEW test3_view AS
> SELECT id, date, col1
> FROM test3 
> WHERE id IS NOT NULL AND date IS NOT NULL
> PRIMARY KEY(id,date) WITH default_time_to_live = 30;
> The queries are accepted in CQL. As per the detail, it should use 30 seconds for Materialized
view and 60 seconds for parent table.
> But, it is always 60 seconds (as the parent table)
> case 1: 
> parent table and materialized view with different TTL
> MV will always have the TTL of parent.
> case 2:
> Parent table without TTL but materialized view with TTL
> MV does not have the TTL even though the configuration has been accepted in the table
creation.
> Expected:
> Either the TTL configuration should not be accepted in the materialized view creation,
if it is of no value.
> Or
> TTL has to be applied differently for both Materialized View and Table if the configuration
is added.
> If no configuration, TTL has to be taken from the parent table. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message