Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-9874

Compact value columns aren't being migrated properly in 3.0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 3.0 alpha 1
    • None
    • None
    • Normal

    Description

      To quote Tyler:

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

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

      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.

      Attachments

        Issue Links

          Activity

            People

              aleksey Aleksey Yeschenko
              aleksey Aleksey Yeschenko
              Aleksey Yeschenko
              Sylvain Lebresne
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: