Aleksey Yeschenko created CASSANDRA-9874:
--------------------------------------------

             Summary: Compact value columns aren't being migrated properly in 
3.0
                 Key: CASSANDRA-9874
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9874
             Project: Cassandra
          Issue Type: Bug
            Reporter: Aleksey Yeschenko
            Assignee: Aleksey Yeschenko
             Fix For: 3.0 beta 1


To quote 
[Tyler|https://issues.apache.org/jira/browse/CASSANDRA-6717?focusedCommentId=14626965&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14626965]:

2.1 and 3.0 currently have different behavior around default compact value 
columns. When you create a table like this:

{code}
CREATE TABLE foo (
    k int,
    c int,
    PRIMARY KEY (k, c)
) WITH COMPACT STORAGE;
{code}

2.1 will add a {{compact_value}} column to {{system.schema_columns}} with an 
empty {{column_name}} and a {{BytesType}} validator.

In 3.0, we instead add a {{regular}} column with the default compact value name 
({{value}}) and an {{EmptyType}} validator.

The logic in 3.0 depends on having an {{EmptyType}} column (see 
{{CompactTables.hasEmptyCompactValue()}}) but current trunk doesn't migrate the 
column. {{LegacySchemaMigrator.addDefinitionForUpgrade()}} almost does what we 
want, but doesn't add the {{EmptyType}} column because it sees the existing 
{{compact_value}} column.






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

Reply via email to