[
https://issues.apache.org/jira/browse/CASSANDRA-8585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14270029#comment-14270029
]
Philip Thompson commented on CASSANDRA-8585:
--------------------------------------------
I should note, in case you weren't aware, though it's too late, upgrading
directly from 2.0.6 to 2.1.2 is not supported. The only supported (or tested)
upgrade path is from the most recent minor version for a given major version,
which would be 2.0.11 -> 2.1.2. It may work, but it is always safer, especially
in a production environment, to do an upgrade path like 2.0.6 -> 2.0.11 ->
2.1.2.
Thank you for being so responsive on this ticket!
> Thrift CLI client reporting inconsistent column family structure after
> upgrade to Cassandra 2.1.2
> -------------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-8585
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8585
> Project: Cassandra
> Issue Type: Bug
> Components: API
> Reporter: Sotirios Delimanolis
> Assignee: Philip Thompson
> Priority: Minor
> Fix For: 2.1.3
>
> Attachments: schema_columnfamilies.out, schema_columns.out
>
>
> After upgrading from Cassandra 2.0.6.4 to Cassandra 2.1.2-SNAPSHOT, the
> Thrift CLI client started reporting wrong default_validation_class for a
> Column Family.
> For example,
> {noformat}
> [default@MyKeyspace] show schema;
> [...]
> create column family SomeColumnFamily
> with column_type = 'Standard'
> and comparator = 'BytesType'
> and default_validation_class = 'BytesType'
> and key_validation_class = 'BytesType'
> and read_repair_chance = 0.1
> and dclocal_read_repair_chance = 0.0
> and gc_grace = 10800
> and min_compaction_threshold = 4
> and max_compaction_threshold = 32
> and compaction_strategy =
> 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
> and caching = 'KEYS_ONLY'
> and cells_per_row_to_cache = '0'
> and default_time_to_live = 0
> and speculative_retry = 'NONE'
> and compaction_strategy_options = {'tombstone_compaction_interval' : '300',
> 'sstable_size_in_mb' : '200', 'tombstone_threshold' : '0.1'}
> and compression_options = {'sstable_compression' :
> 'org.apache.cassandra.io.compress.SnappyCompressor'};
> {noformat}
> but
> {noformat}
> [default@MyKeyspace] describe SomeColumnFamily;
> WARNING: CQL3 tables are intentionally omitted from 'describe' output.
> See https://issues.apache.org/jira/browse/CASSANDRA-4377 for details.
> ColumnFamily: SomeColumnFamily
> Key Validation Class: org.apache.cassandra.db.marshal.BytesType
> Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
> Cells sorted by: org.apache.cassandra.db.marshal.UTF8Type
> GC grace seconds: 10800
> Compaction min/max thresholds: 4/32
> Read repair chance: 0.1
> DC Local Read repair chance: 0.0
> Caching: KEYS_ONLY
> Default time to live: 0
> Bloom Filter FP chance: default
> Index interval: default
> Speculative Retry: NONE
> Built indexes: []
> Compaction Strategy:
> org.apache.cassandra.db.compaction.LeveledCompactionStrategy
> Compaction Strategy Options:
> tombstone_compaction_interval: 300
> sstable_size_in_mb: 200
> tombstone_threshold: 0.1
> Compression Options:
> sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
> {noformat}
> Note how the default column value validator and cell sorting is UTF8Type
> rather than the BytesType reported earlier.
> If I populate the column family and list its rows, I get
> {noformat}
> [default@MyKeyspace] list SomeColumnFamily;
> Using default limit of 100
> Using default cell limit of 100
> -------------------
> RowKey: SomeRowKey
> String didn't validate.
> {noformat}
> I can't see the row. I can temporarily fix this by setting the
> default_column_validator
> {noformat}
> [default@MyKeyspace] update column family SomeColumnFamily with
> default_validation_class = BytesType;
> 0fba13e4-aac6-3963-ad65-ba354d99ebdc
> [default@MyKeyspace] list SomeColumnFamily;
> Using default limit of 100
> Using default cell limit of 100
> -------------------
> RowKey: SomeRowKey
> => (name=some name, value=some value, timestamp=635540144263687300)
> -------------------
> [More RowKeys]
> {noformat}
> If I do a DESCRIBE again, though, LIST stops working again.
> {noformat}
> [default@KeySpace] describe SomeColumnFamily;
> WARNING: CQL3 tables are intentionally omitted from 'describe' output.
> See https://issues.apache.org/jira/browse/CASSANDRA-4377 for details.
> ColumnFamily: SomeColumnFamily
> Key Validation Class: org.apache.cassandra.db.marshal.BytesType
> Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
> Cells sorted by: org.apache.cassandra.db.marshal.UTF8Type
> GC grace seconds: 10800
> Compaction min/max thresholds: 4/32
> Read repair chance: 0.1
> DC Local Read repair chance: 0.0
> Caching: KEYS_ONLY
> Default time to live: 0
> Bloom Filter FP chance: default
> Index interval: default
> Speculative Retry: NONE
> Built indexes: []
> Compaction Strategy:
> org.apache.cassandra.db.compaction.LeveledCompactionStrategy
> Compaction Strategy Options:
> tombstone_compaction_interval: 300
> sstable_size_in_mb: 200
> tombstone_threshold: 0.1
> Compression Options:
> sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
> [default@MyKeyspace] list SomeColumnFamily;
> Using default limit of 100
> Using default cell limit of 100
> -------------------
> RowKey: SomeRowKey
> String didn't validate.
> {noformat}
> I can access the column family rows with other clients, the C# driver for
> example.
> With C#
> {code:}
> var keyspaceDef = pool.DescribeKeyspace ("MyKeyspace");
> var cfDefs = keyspaceDef.Cf_defs;
> foreach (CfDef cfDef in cfDefs) {
> if (cfDef.Name == "SomeColumnFamily") {
> Console.WriteLine ("Default validation class: " +
> cfDef.Default_validation_class);
> Console.WriteLine ("Comparator type: " + cfDef.Comparator_type);
> Console.WriteLine ("Key validation class: " +
> cfDef.Key_validation_class);
> }
> }
> {code}
> outputs
> {noformat}
> Default validation class: org.apache.cassandra.db.marshal.BytesType
> Comparator type: org.apache.cassandra.db.marshal.BytesType
> Key validation class: org.apache.cassandra.db.marshal.BytesType
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)