[ https://issues.apache.org/jira/browse/CASSANDRA-8000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14146938#comment-14146938 ]
Michael Shuler commented on CASSANDRA-8000: ------------------------------------------- Huh. I realized looking through my first repro, 1.2.15 -> 2.0.9, that I did not run upgradesstables. Running the same versions, including upgradesstables, I do not see the same behavior and this does not seem to reproduce. {noformat} mshuler@hana:~$ ccm create 8000 -n2 -v 1.2.15 Current cluster is now: 8000 mshuler@hana:~$ ccm start mshuler@hana:~$ ccm node1 cqlsh Connected to 8000 at 127.0.0.1:9160. [cqlsh 3.1.8 | Cassandra 1.2.15-SNAPSHOT | CQL spec 3.0.0 | Thrift protocol 19.36.2] Use HELP for help. cqlsh> CREATE KEYSPACE testkeyspace WITH replication = { ... 'class': 'SimpleStrategy', ... 'replication_factor':2 ... }; cqlsh> cqlsh> USE testkeyspace; cqlsh:testkeyspace> cqlsh:testkeyspace> CREATE TABLE test ( ... testid timeuuid PRIMARY KEY, ... businesskey timestamp, ... createdby text, ... createdtimestamp timestamp, ... testname text ... ) ; cqlsh:testkeyspace> cqlsh:testkeyspace> cqlsh:testkeyspace> insert into test(testid,businesskey,createdby,createdtimestamp,testname) VALUES (now(),dateOf(now()),'user',dateOf(now()),'test'); cqlsh:testkeyspace> cqlsh:testkeyspace> SELECT * FROM test; testid | businesskey | createdby | createdtimestamp | testname --------------------------------------+--------------------------+-----------+--------------------------+---------- 54170360-4434-11e4-be2e-25721e450b6c | 2014-09-24 16:47:06-0500 | user | 2014-09-24 16:47:06-0500 | test cqlsh:testkeyspace> mshuler@hana:~$ ccm node1 nodetool decommission mshuler@hana:~$ ccm node1 stop mshuler@hana:~$ ccm node1 setdir --cassandra-version 2.0.9 mshuler@hana:~$ ccm node1 start mshuler@hana:~$ ccm node1 nodetool upgradesstables mshuler@hana:~$ ccm node1 cqlsh Connected to 8000 at 127.0.0.1:9160. [cqlsh 4.1.1 | Cassandra 2.0.9-SNAPSHOT | CQL spec 3.1.1 | Thrift protocol 19.39.0] Use HELP for help. cqlsh> SELECT * FROM testkeyspace.test ; testid | businesskey | createdby | createdtimestamp | testname --------------------------------------+--------------------------+-----------+--------------------------+---------- 54170360-4434-11e4-be2e-25721e450b6c | 2014-09-24 16:47:06-0500 | user | 2014-09-24 16:47:06-0500 | test (1 rows) cqlsh> mshuler@hana:~$ ccm node2 cqlsh Connected to 8000 at 127.0.0.2:9160. [cqlsh 3.1.8 | Cassandra 1.2.15-SNAPSHOT | CQL spec 3.0.0 | Thrift protocol 19.36.2] Use HELP for help. cqlsh> SELECT * FROM testkeyspace.test ; testid | businesskey | createdby | createdtimestamp | testname --------------------------------------+--------------------------+-----------+--------------------------+---------- 54170360-4434-11e4-be2e-25721e450b6c | 2014-09-24 16:47:06-0500 | user | 2014-09-24 16:47:06-0500 | test cqlsh> mshuler@hana:~$ ccm node2 cqlsh Connected to 8000 at 127.0.0.2:9160. [cqlsh 3.1.8 | Cassandra 1.2.15-SNAPSHOT | CQL spec 3.0.0 | Thrift protocol 19.36.2] Use HELP for help. cqlsh> DESC TABLE testkeyspace.test ; CREATE TABLE test ( testid timeuuid PRIMARY KEY, businesskey timestamp, createdby text, createdtimestamp timestamp, testname text ) WITH bloom_filter_fp_chance=0.010000 AND caching='KEYS_ONLY' AND comment='' AND dclocal_read_repair_chance=0.000000 AND gc_grace_seconds=864000 AND read_repair_chance=0.100000 AND replicate_on_write='true' AND populate_io_cache_on_flush='false' AND compaction={'class': 'SizeTieredCompactionStrategy'} AND compression={'sstable_compression': 'SnappyCompressor'}; cqlsh> mshuler@hana:~$ {noformat} > Schema Corruption when 1.2.15->2.0.9 rolling upgrade and in mixed mode > ---------------------------------------------------------------------- > > Key: CASSANDRA-8000 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8000 > Project: Cassandra > Issue Type: Bug > Reporter: Yeshvanthni > > Steps to reproduce: > 1. Setup multi-node Cassandra 1.2.15 with following schema > {code} > CREATE KEYSPACE testkeyspace WITH replication = { > 'class': 'SimpleStrategy', > 'replication_factor':2 > }; > USE testkeyspace; > CREATE TABLE test ( > testid timeuuid PRIMARY KEY, > businesskey timestamp, > createdby text, > createdtimestamp timestamp, > testname text > ) ; > insert into test(testid,businesskey,createdby,createdtimestamp,testname) > VALUES (now(),dateOf(now()),'user',dateOf(now()),'test'); > {code} > 2. Roll one node to Cassandra 2.0.9 > - Snapshot 1.2.15 > - Decommission the old 1.2.15 > - Start Cassandra 2.0.9 pointing to the same data folder as 1.2.15 > - nodetool upgradesstables > 3. Query against 1.2.15 nodes of the cluster with CQLSH > It returns an additional primary key column with null value in it. Describe > shows that the table has somehow got the additional column > {code} > CREATE TABLE test ( > testid timeuuid PRIMARY KEY, > testid timeuuid, > businesskey timestamp, > createdby text, > createdtimestamp timestamp, > testname text > ) ; > {code} > Observation: > This could be because of the change in Cassandra 2.x to store all columns > including the key columns in schema_columns while earlier key columns were > stored schema_columnfamilies. > This blocks rolling upgrades and fails the cluster when in mixed mode. -- This message was sent by Atlassian JIRA (v6.3.4#6332)