incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Leschenko <>
Subject AssertionError during ALTER TYPE in 1.2.5
Date Fri, 26 Jul 2013 15:48:53 GMT
I have following column family from pre-CQL times, now using 1.2.5 and
want to investigate ability to use CQL instead of Thrift API.

   ColumnFamily: RRD
      Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
      Default column value validator: org.apache.cassandra.db.marshal.BytesType
      Columns sorted by: org.apache.cassandra.db.marshal.BytesType
      GC grace seconds: 864000
      Compaction min/max thresholds: 4/32
      Read repair chance: 0.1
      DC Local Read repair chance: 0.0
      Populate IO Cache on flush: false
      Replicate on write: true
      Caching: KEYS_ONLY
      Bloom Filter FP chance: default
      Built indexes: []
      Compaction Strategy:
      Compression Options:

In cqlsh it looks like

  key text,
  column1 blob,
  value blob,
  PRIMARY KEY (key, column1)
  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'};

I have already successfully changed type of key from blob to text.
column1 is actually a text string, as I would like to change it type
from blob to text too.

But when I run query  ALTER TABLE  "RRD" ALTER  column1  TYPE text,
cqlsh hangs, and I observe following error in Cassandra log:

ERROR 18:28:56,103 Exception in thread Thread[Thrift:16,5,main]
	at org.apache.cassandra.cql3.statements.AlterTableStatement.announceMigration(
	at org.apache.cassandra.cql3.statements.SchemaAlteringStatement.execute(
	at org.apache.cassandra.cql3.QueryProcessor.processStatement(
	at org.apache.cassandra.cql3.QueryProcessor.process(
	at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(
	at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(
	at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(
	at org.apache.thrift.ProcessFunction.process(
	at org.apache.thrift.TBaseProcessor.process(
	at org.apache.cassandra.thrift.CustomTThreadPoolServer$
	at java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.util.concurrent.ThreadPoolExecutor$

>From source code I see that it  failed assertion:
     case COLUMN_ALIAS:
                   assert cfDef.isComposite;

So it have to be composite, but there is already exists PRIMARY KEY
(key, column1). Did I miss something?
How can I change type of this column1 ?



View raw message