You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Alex Petrov (JIRA)" <ji...@apache.org> on 2016/07/15 16:29:20 UTC

[jira] [Comment Edited] (CASSANDRA-7190) Add schema to snapshot manifest

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

Alex Petrov edited comment on CASSANDRA-7190 at 7/15/16 4:28 PM:
-----------------------------------------------------------------

Thank you for the review. 

I've found a couple of "edge cases" in generation that have affected the implementation: create a column with a UDT, drop column and then drop UDT, type referenced in the {{DroppedColumn}} is now just a tuple type. That was also the reason to not include types of dropped columns together with the other {{CREATE TYPE}} statements. Also, re-adding static columns. During {{ALTER TABLE ADD}}, it's important to use the non-dropped definition. 

Things like dropping type that's present in dropped column is also covered with tests. 

I've added a file called {{schema.cql}} that contains all re-create schema information, all consolidated in a single file. It starts with creating types, followed by the table creation, then dropped columns (with re-creation, where column first created in {{CREATE TABLE}} statement, then dropped with a timestamp and then re-added back), and finally followed by indexes, as they require a full schema. 

Also, the test with drop/re-add static column is added to make sure behaviour is as desired.

|[trunk|https://github.com/ifesdjeen/cassandra/tree/7190-trunk]|[utest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-7190-trunk-testall/]|[dtest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-7190-trunk-dtest/]|


was (Author: ifesdjeen):
Thank you for the review. 

I've found a couple of "edge cases" in generation that have affected the implementation: create a column with a UDT, drop column and then drop UDT, type referenced in the {{DroppedColumn}} is now just a tuple type. That was also the reason to not include types of dropped columns together with the other {{CREATE TYPE}} statements. Also, re-adding static columns. During {{ALTER TABLE ADD}}, it's important to use the non-dropped definition. 

Things like dropping type that's present in dropped column is also covered with tests. 

I've added a file called {{schema.cql}} that contains all re-create schema information, all consolidated in a single file. It starts with creating types, followed by the table creation, then dropped columns (with re-creation, where column first created in {{CREATE TABLE}} statement, then dropped with a timestamp and then re-added back), and finally followed by indexes, as they require a full schema. 

Also, the test with drop/re-add static column is added to make sure behaviour is as desired.

|[trunk|https://github.com/ifesdjeen/cassandra/tree/7190-trunk]|[utest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-7190-trunk-testall/]|[dtest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-7190-trunk-dtest/]|
|[3.0|https://github.com/ifesdjeen/cassandra/tree/7190-3.0]|[utest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-7190-3.0-testall/]|[dtest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-7190-3.0-dtest/]|
|[3.7|https://github.com/ifesdjeen/cassandra/tree/7190-3.7]|[utest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-7190-3.7-testall/]|[dtest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-7190-3.7-dtest/]|

> Add schema to snapshot manifest
> -------------------------------
>
>                 Key: CASSANDRA-7190
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7190
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>            Reporter: Jonathan Ellis
>            Assignee: Alex Petrov
>            Priority: Minor
>              Labels: client-impacting, doc-impacting, lhf
>             Fix For: 3.x
>
>
> followup from CASSANDRA-6326



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