cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Romain Hardouin (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-10857) Allow dropping COMPACT STORAGE flag from tables in 3.X
Date Sat, 15 Oct 2016 08:23:20 GMT


Romain Hardouin commented on CASSANDRA-10857:

bq. Such a table (compact with only PK columns) [...] I fear that because it is useless to
him, his first reaction will be to drop that column (which he can). Problem is, if he does
that, he'll basically have remove all its data, essentially dropping the table

Is it possible to add a "non droppable" internal attribute in ColumnDefinition to disallow
the DROP in {{CFMetada.removeColumnDefinition()}}? Or is it possible to disallow the DROP
statement earlier (like {{!cfm.isCQLTable()}} in AlterTableStatement) if we keep a trace somewhere
of that specific case (I mean during the DROP COMPACT STORAGE)?

> Allow dropping COMPACT STORAGE flag from tables in 3.X
> ------------------------------------------------------
>                 Key: CASSANDRA-10857
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: CQL, Distributed Metadata
>            Reporter: Aleksey Yeschenko
>            Assignee: Alex Petrov
>             Fix For: 3.x
> Thrift allows users to define flexible mixed column families - where certain columns
would have explicitly pre-defined names, potentially non-default validation types, and be
> Example:
> {code}
> create column family foo
>     and default_validation_class = UTF8Type
>     and column_metadata = [
>         {column_name: bar, validation_class: Int32Type, index_type: KEYS},
>         {column_name: baz, validation_class: UUIDType, index_type: KEYS}
>     ];
> {code}
> Columns named {{bar}} and {{baz}} will be validated as {{Int32Type}} and {{UUIDType}},
respectively, and be indexed. Columns with any other name will be validated by {{UTF8Type}}
and will not be indexed.
> With CASSANDRA-8099, {{bar}} and {{baz}} would be mapped to static columns internally.
However, being {{WITH COMPACT STORAGE}}, the table will only expose {{bar}} and {{baz}} columns.
Accessing any dynamic columns (any column not named {{bar}} and {{baz}}) right now requires
going through Thrift.
> This is blocking Thrift -> CQL migration for users who have mixed dynamic/static column
families. That said, it *shouldn't* be hard to allow users to drop the {{compact}} flag to
expose the table as it is internally now, and be able to access all columns.

This message was sent by Atlassian JIRA

View raw message