[ https://issues.apache.org/jira/browse/CASSANDRA-6161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis resolved CASSANDRA-6161. --------------------------------------- Resolution: Cannot Reproduce > CF with composite columns can not be accessed from thrift (include cli > interface) when upgrade to 1.2.9 > ------------------------------------------------------------------------------------------------------- > > Key: CASSANDRA-6161 > URL: https://issues.apache.org/jira/browse/CASSANDRA-6161 > Project: Cassandra > Issue Type: Bug > Components: Core, Tools > Environment: ubuntu x64 12.04 LTS, 3 nodes cluster > Reporter: Jonas Wu > Priority: Critical > > We encounter this problem when upgrade from 1.2.6 to 1.2.9 . For our > careless we set the same initial_token on two nodes among the cluster, and > cancel the process immediately at startup stage. But after fix and start > again, cassandra fault at startup stage on this two nodes. > {quote} > ERROR 08:37:52,194 Exception encountered during startup > java.lang.AssertionError > at > org.apache.cassandra.cql3.CFDefinition.<init>(CFDefinition.java:162) > at > org.apache.cassandra.config.CFMetaData.updateCfDef(CFMetaData.java:1526) > at > org.apache.cassandra.config.CFMetaData.fromSchema(CFMetaData.java:1441) > at > org.apache.cassandra.config.KSMetaData.deserializeColumnFamilies(KSMetaData.java:306) > at > org.apache.cassandra.config.KSMetaData.fromSchema(KSMetaData.java:287) > at org.apache.cassandra.db.DefsTable.loadFromTable(DefsTable.java:154) > at > org.apache.cassandra.config.DatabaseDescriptor.loadSchemas(DatabaseDescriptor.java:563) > at > org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:254) > at > org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:447) > at > org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:490) > java.lang.AssertionError > at > org.apache.cassandra.cql3.CFDefinition.<init>(CFDefinition.java:162) > at > org.apache.cassandra.config.CFMetaData.updateCfDef(CFMetaData.java:1526) > at > org.apache.cassandra.config.CFMetaData.fromSchema(CFMetaData.java:1441) > at > org.apache.cassandra.config.KSMetaData.deserializeColumnFamilies(KSMetaData.java:306) > at > org.apache.cassandra.config.KSMetaData.fromSchema(KSMetaData.java:287) > at org.apache.cassandra.db.DefsTable.loadFromTable(DefsTable.java:154) > at > org.apache.cassandra.config.DatabaseDescriptor.loadSchemas(DatabaseDescriptor.java:563) > at > org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:254) > at > org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:447) > at > org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:490) > Exception encountered during startup: null > {quote} > if we delete data/system directory and start again, both starting normally > and begin to sync. But after that operation, all the CFs can not be found > from cli interface on these two node, also we test with client api > pycassa(via thrift api) and get 'column family not found' error for all CFs. > Also we try to resetlocalschema via nodetool, but get the following error > {quote} > ERROR 08:45:56,122 Exception in thread Thread[InternalResponseStage:12,5,main] > org.apache.cassandra.db.marshal.MarshalException: unable to coerce 'column2' > to version 1 UUID > at > org.apache.cassandra.db.marshal.UUIDType.fromString(UUIDType.java:239) > at > org.apache.cassandra.config.ColumnDefinition.fromSchema(ColumnDefinition.java:230) > at > org.apache.cassandra.config.CFMetaData.addColumnDefinitionSchema(CFMetaData.java:1509) > at > org.apache.cassandra.config.CFMetaData.fromSchema(CFMetaData.java:1441) > at > org.apache.cassandra.config.KSMetaData.deserializeColumnFamilies(KSMetaData.java:306) > at > org.apache.cassandra.db.DefsTable.mergeColumnFamilies(DefsTable.java:444) > at org.apache.cassandra.db.DefsTable.mergeSchema(DefsTable.java:356) > at > org.apache.cassandra.service.MigrationTask$1.response(MigrationTask.java:66) > at > org.apache.cassandra.net.ResponseVerbHandler.doVerb(ResponseVerbHandler.java:47) > at > org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:56) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:724) > Caused by: java.text.ParseException: Unable to parse the date: column2 > at > org.apache.commons.lang.time.DateUtils.parseDateWithLeniency(DateUtils.java:359) > at > org.apache.commons.lang.time.DateUtils.parseDate(DateUtils.java:285) > at > org.apache.cassandra.db.marshal.UUIDType.fromString(UUIDType.java:234) > ... 12 more > {quote} > We have not restart the third node, and it still function correctly and can > show table from cli and cqlsh, but we find that the same problem would > happen when we copy the third node data dir to a new server and start > cassandra. That is, if we restart the final node accidentally, all the node > would be the same problem. > The following is one of our CF with composite column schema example. > {panel:title=cqlsh} > CREATE TABLE "Foo" ( > key uuid, > column1 text, > column2 text, > title text, > "num:click" varint, > PRIMARY KEY (key, column1, column2) > ) WITH COMPACT STORAGE AND > 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'\}; > {panel} > {panel:title=cli} > create column family Foo > with column_type = 'Standard' > and comparator = > 'CompositeType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.UTF8Type)' > and default_validation_class = 'UTF8Type' > and key_validation_class = 'UUIDType' > and read_repair_chance = 0.1 > and dclocal_read_repair_chance = 0.0 > and populate_io_cache_on_flush = false > and gc_grace = 864000 > and min_compaction_threshold = 4 > and max_compaction_threshold = 32 > and replicate_on_write = true > and compaction_strategy = > 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy' > and caching = 'KEYS_ONLY' > and column_metadata = [ > \{column_name : 'title', > validation_class : UTF8Type}, > {column_name : 'num:click', > validation_class : IntegerType\} > ] and compression_options = \{'sstable_compression' : > 'org.apache.cassandra.io.compress.SnappyCompressor'\}; > {panel} -- This message was sent by Atlassian JIRA (v6.1#6144)