cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Russ Hatch (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-6520) cqlsh disconnects active node when dropping column
Date Fri, 20 Dec 2013 23:14:09 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-6520?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Russ Hatch updated CASSANDRA-6520:
----------------------------------

    Description: 
Using ccqlsh, I issue a statement to drop a column from a table, and the session appears to
disconnect.

The statement was:
{noformat}
cqlsh:taskapp> alter table user_task drop task_order;
{noformat}
Here's the full setup I used:
{noformat}
ccm create test_cluster
ccm populate -n 3
ccm start
ccm node1 cqlsh

CREATE KEYSPACE taskapp WITH replication = {
  'class': 'SimpleStrategy',
  'replication_factor': '3'
};

use taskapp;

create table user (
    user_id timeuuid PRIMARY KEY,
    first_name text,
    last_name text,
    email text
);

create table user_task (
    task_id timeuuid PRIMARY KEY,
    user_id timeuuid,
    task_order int,
    task_description text,
    is_complete boolean,
    is_top_level boolean,
    subtask_ids list<timeuuid>
);
{noformat}
and then the statement which triggers the disconnect:
{noformat}
cqlsh:taskapp> alter table user_task drop task_order;
TSocket read 0 bytes
TSocket read 0 bytes
cqlsh:taskapp> describe table user_task;

[Errno 32] Broken pipe
{noformat}

The log for the active node shows this INFO, followed immediately by an exception (included
below). The other nodes show no relevant messages:
{noformat}
INFO  [Thrift:4] 2013-12-20 16:04:58,668 MigrationManager.java:263 - Update ColumnFamily 'taskapp/user_task'
From org.apache.cassandra.config.CFMetaData@15e4ed88[cfId=df7153ac-c309-3bd2-92c2-e05bb53153fb,ksName=taskapp,cfName=user_task,cfType=Standard,comparator=org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.ColumnToCollectionType(7375627461736b5f696473:org.apache.cassandra.db.marshal.ListType(org.apache.cassandra.db.marshal.TimeUUIDType))),comment=,readRepairChance=0.1,dclocalReadRepairChance=0.0,replicateOnWrite=true,gcGraceSeconds=864000,defaultValidator=org.apache.cassandra.db.marshal.BytesType,keyValidator=org.apache.cassandra.db.marshal.TimeUUIDType,minCompactionThreshold=4,maxCompactionThreshold=32,columnMetadata={java.nio.HeapByteBuffer[pos=0
lim=11 cap=11]=ColumnDefinition{name=subtask_ids, type=org.apache.cassandra.db.marshal.ListType(org.apache.cassandra.db.marshal.TimeUUIDType),
kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, java.nio.HeapByteBuffer[pos=0
lim=11 cap=11]=ColumnDefinition{name=is_complete, type=org.apache.cassandra.db.marshal.BooleanType,
kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, java.nio.HeapByteBuffer[pos=0
lim=12 cap=12]=ColumnDefinition{name=is_top_level, type=org.apache.cassandra.db.marshal.BooleanType,
kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, java.nio.HeapByteBuffer[pos=0
lim=7 cap=7]=ColumnDefinition{name=task_id, type=org.apache.cassandra.db.marshal.TimeUUIDType,
kind=PARTITION_KEY, componentIndex=null, indexName=null, indexType=null}, java.nio.HeapByteBuffer[pos=0
lim=10 cap=10]=ColumnDefinition{name=task_order, type=org.apache.cassandra.db.marshal.Int32Type,
kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, java.nio.HeapByteBuffer[pos=0
lim=7 cap=7]=ColumnDefinition{name=user_id, type=org.apache.cassandra.db.marshal.TimeUUIDType,
kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, java.nio.HeapByteBuffer[pos=0
lim=16 cap=16]=ColumnDefinition{name=task_description, type=org.apache.cassandra.db.marshal.UTF8Type,
kind=REGULAR, componentIndex=0, indexName=null, indexType=null}},compactionStrategyClass=class
org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy,compactionStrategyOptions={},compressionOptions={sstable_compression=org.apache.cassandra.io.compress.LZ4Compressor},bloomFilterFpChance=0.01,memtable_flush_period_in_ms=0,caching=KEYS_ONLY,defaultTimeToLive=0,speculative_retry=99.0PERCENTILE,indexInterval=128,populateIoCacheOnFlush=false,droppedColumns={},triggers={}]
To org.apache.cassandra.config.CFMetaData@3568f812[cfId=df7153ac-c309-3bd2-92c2-e05bb53153fb,ksName=taskapp,cfName=user_task,cfType=Standard,comparator=org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.ColumnToCollectionType(7375627461736b5f696473:org.apache.cassandra.db.marshal.ListType(org.apache.cassandra.db.marshal.TimeUUIDType))),comment=,readRepairChance=0.1,dclocalReadRepairChance=0.0,replicateOnWrite=true,gcGraceSeconds=864000,defaultValidator=org.apache.cassandra.db.marshal.BytesType,keyValidator=org.apache.cassandra.db.marshal.TimeUUIDType,minCompactionThreshold=4,maxCompactionThreshold=32,columnMetadata={java.nio.HeapByteBuffer[pos=0
lim=11 cap=11]=ColumnDefinition{name=subtask_ids, type=org.apache.cassandra.db.marshal.ListType(org.apache.cassandra.db.marshal.TimeUUIDType),
kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, java.nio.HeapByteBuffer[pos=0
lim=11 cap=11]=ColumnDefinition{name=is_complete, type=org.apache.cassandra.db.marshal.BooleanType,
kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, java.nio.HeapByteBuffer[pos=0
lim=12 cap=12]=ColumnDefinition{name=is_top_level, type=org.apache.cassandra.db.marshal.BooleanType,
kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, java.nio.HeapByteBuffer[pos=0
lim=7 cap=7]=ColumnDefinition{name=task_id, type=org.apache.cassandra.db.marshal.TimeUUIDType,
kind=PARTITION_KEY, componentIndex=null, indexName=null, indexType=null}, java.nio.HeapByteBuffer[pos=0
lim=7 cap=7]=ColumnDefinition{name=user_id, type=org.apache.cassandra.db.marshal.TimeUUIDType,
kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, java.nio.HeapByteBuffer[pos=0
lim=16 cap=16]=ColumnDefinition{name=task_description, type=org.apache.cassandra.db.marshal.UTF8Type,
kind=REGULAR, componentIndex=0, indexName=null, indexType=null}},compactionStrategyClass=class
org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy,compactionStrategyOptions={},compressionOptions={sstable_compression=org.apache.cassandra.io.compress.LZ4Compressor},bloomFilterFpChance=0.01,memtable_flush_period_in_ms=0,caching=KEYS_ONLY,defaultTimeToLive=0,speculative_retry=99.0PERCENTILE,indexInterval=128,populateIoCacheOnFlush=false,droppedColumns={task_order=1387580698664000},triggers={}]
ERROR [Thrift:4] 2013-12-20 16:04:58,672 CustomTThreadPoolServer.java:212 - Error occurred
during processing of message.
java.lang.ClassCastException: java.lang.Long cannot be cast to java.util.Map
	at org.apache.cassandra.serializers.MapSerializer.serialize(MapSerializer.java:27) ~[main/:na]
	at org.apache.cassandra.db.marshal.AbstractType.decompose(AbstractType.java:71) ~[main/:na]
	at org.apache.cassandra.db.CFRowAdder.add(CFRowAdder.java:78) ~[main/:na]
	at org.apache.cassandra.db.CFRowAdder.addMapEntry(CFRowAdder.java:65) ~[main/:na]
	at org.apache.cassandra.config.CFMetaData.toSchemaNoColumnsNoTriggers(CFMetaData.java:1610)
~[main/:na]
	at org.apache.cassandra.config.CFMetaData.toSchemaUpdate(CFMetaData.java:1483) ~[main/:na]
	at org.apache.cassandra.service.MigrationManager.announceColumnFamilyUpdate(MigrationManager.java:264)
~[main/:na]
	at org.apache.cassandra.cql3.statements.AlterTableStatement.announceMigration(AlterTableStatement.java:217)
~[main/:na]
	at org.apache.cassandra.cql3.statements.SchemaAlteringStatement.execute(SchemaAlteringStatement.java:71)
~[main/:na]
	at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:194) ~[main/:na]
	at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:228) ~[main/:na]
	at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:218) ~[main/:na]
	at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1966)
~[main/:na]
	at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4486)
~[thrift/:na]
	at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4470)
~[thrift/:na]
	at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) ~[libthrift-0.9.1.jar:0.9.1]
	at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) ~[libthrift-0.9.1.jar:0.9.1]
	at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:194)
~[main/:na]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_45]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_45]
	at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
{noformat}

  was:
Using ccqlsh, I issue a drop statement for a table and it hangs indefinitely (running cassandra-2.0.3-709-g486f079
from trunk).

Here's the statement:
cqlsh:taskapp> drop table user_task;

Here's the full setup I used:
{noformat}
ccm create test_cluster
ccm populate -n 3
ccm start
ccm node1 cqlsh

CREATE KEYSPACE taskapp WITH replication = {
  'class': 'SimpleStrategy',
  'replication_factor': '3'
};

use taskapp;

create table user (
    user_id timeuuid PRIMARY KEY,
    first_name text,
    last_name text,
    email text
);

create table user_task (
    task_id timeuuid PRIMARY KEY,
    user_id timeuuid,
    task_order int,
    task_description text,
    is_complete boolean,
    is_top_level boolean,
    subtask_ids list<timeuuid>
);
{noformat}
and then the statement which hangs:
drop table user_task;

I also checked that all 3 nodes have the same schema version uuid, using these queries someone
shared with me:
{noformat}
cqlsh:taskapp> SELECT rpc_address, schema_version FROM system.peers
           ... ;

 rpc_address | schema_version
-------------+--------------------------------------
   127.0.0.3 | 6e782241-91e9-3cfa-88c0-88f445a573c1
   127.0.0.2 | 6e782241-91e9-3cfa-88c0-88f445a573c1

(2 rows)

cqlsh:taskapp> SELECT schema_version FROM system.local WHERE key='local';

 schema_version
--------------------------------------
 6e782241-91e9-3cfa-88c0-88f445a573c1

(1 rows)
{noformat}

I checked the logs for all 3 nodes, which I think were normal. Node1 (used in the cqlsh session)
showed this message:
{noformat}
INFO  [Thrift:3] 2013-12-20 14:29:23,200 MigrationManager.java:289 - Drop ColumnFamily 'taskapp/user_task'
{noformat}
The other node logs showed no activity that looked related to the attempted drop statement.


> cqlsh disconnects active node when dropping column
> --------------------------------------------------
>
>                 Key: CASSANDRA-6520
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6520
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>         Environment: C* from trunk -- cassandra-2.0.3-709-g486f079
> java 1.7.0_45 (on linux 64 bit)
> [cqlsh 4.1.0 | Cassandra 2.1-SNAPSHOT | CQL spec 3.1.1 | Thrift protocol 19.39.0]
> 3 node cluster built on my machine using ccm
>            Reporter: Russ Hatch
>            Assignee: Russ Hatch
>
> Using ccqlsh, I issue a statement to drop a column from a table, and the session appears
to disconnect.
> The statement was:
> {noformat}
> cqlsh:taskapp> alter table user_task drop task_order;
> {noformat}
> Here's the full setup I used:
> {noformat}
> ccm create test_cluster
> ccm populate -n 3
> ccm start
> ccm node1 cqlsh
> CREATE KEYSPACE taskapp WITH replication = {
>   'class': 'SimpleStrategy',
>   'replication_factor': '3'
> };
> use taskapp;
> create table user (
>     user_id timeuuid PRIMARY KEY,
>     first_name text,
>     last_name text,
>     email text
> );
> create table user_task (
>     task_id timeuuid PRIMARY KEY,
>     user_id timeuuid,
>     task_order int,
>     task_description text,
>     is_complete boolean,
>     is_top_level boolean,
>     subtask_ids list<timeuuid>
> );
> {noformat}
> and then the statement which triggers the disconnect:
> {noformat}
> cqlsh:taskapp> alter table user_task drop task_order;
> TSocket read 0 bytes
> TSocket read 0 bytes
> cqlsh:taskapp> describe table user_task;
> [Errno 32] Broken pipe
> {noformat}
> The log for the active node shows this INFO, followed immediately by an exception (included
below). The other nodes show no relevant messages:
> {noformat}
> INFO  [Thrift:4] 2013-12-20 16:04:58,668 MigrationManager.java:263 - Update ColumnFamily
'taskapp/user_task' From org.apache.cassandra.config.CFMetaData@15e4ed88[cfId=df7153ac-c309-3bd2-92c2-e05bb53153fb,ksName=taskapp,cfName=user_task,cfType=Standard,comparator=org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.ColumnToCollectionType(7375627461736b5f696473:org.apache.cassandra.db.marshal.ListType(org.apache.cassandra.db.marshal.TimeUUIDType))),comment=,readRepairChance=0.1,dclocalReadRepairChance=0.0,replicateOnWrite=true,gcGraceSeconds=864000,defaultValidator=org.apache.cassandra.db.marshal.BytesType,keyValidator=org.apache.cassandra.db.marshal.TimeUUIDType,minCompactionThreshold=4,maxCompactionThreshold=32,columnMetadata={java.nio.HeapByteBuffer[pos=0
lim=11 cap=11]=ColumnDefinition{name=subtask_ids, type=org.apache.cassandra.db.marshal.ListType(org.apache.cassandra.db.marshal.TimeUUIDType),
kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, java.nio.HeapByteBuffer[pos=0
lim=11 cap=11]=ColumnDefinition{name=is_complete, type=org.apache.cassandra.db.marshal.BooleanType,
kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, java.nio.HeapByteBuffer[pos=0
lim=12 cap=12]=ColumnDefinition{name=is_top_level, type=org.apache.cassandra.db.marshal.BooleanType,
kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, java.nio.HeapByteBuffer[pos=0
lim=7 cap=7]=ColumnDefinition{name=task_id, type=org.apache.cassandra.db.marshal.TimeUUIDType,
kind=PARTITION_KEY, componentIndex=null, indexName=null, indexType=null}, java.nio.HeapByteBuffer[pos=0
lim=10 cap=10]=ColumnDefinition{name=task_order, type=org.apache.cassandra.db.marshal.Int32Type,
kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, java.nio.HeapByteBuffer[pos=0
lim=7 cap=7]=ColumnDefinition{name=user_id, type=org.apache.cassandra.db.marshal.TimeUUIDType,
kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, java.nio.HeapByteBuffer[pos=0
lim=16 cap=16]=ColumnDefinition{name=task_description, type=org.apache.cassandra.db.marshal.UTF8Type,
kind=REGULAR, componentIndex=0, indexName=null, indexType=null}},compactionStrategyClass=class
org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy,compactionStrategyOptions={},compressionOptions={sstable_compression=org.apache.cassandra.io.compress.LZ4Compressor},bloomFilterFpChance=0.01,memtable_flush_period_in_ms=0,caching=KEYS_ONLY,defaultTimeToLive=0,speculative_retry=99.0PERCENTILE,indexInterval=128,populateIoCacheOnFlush=false,droppedColumns={},triggers={}]
To org.apache.cassandra.config.CFMetaData@3568f812[cfId=df7153ac-c309-3bd2-92c2-e05bb53153fb,ksName=taskapp,cfName=user_task,cfType=Standard,comparator=org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.ColumnToCollectionType(7375627461736b5f696473:org.apache.cassandra.db.marshal.ListType(org.apache.cassandra.db.marshal.TimeUUIDType))),comment=,readRepairChance=0.1,dclocalReadRepairChance=0.0,replicateOnWrite=true,gcGraceSeconds=864000,defaultValidator=org.apache.cassandra.db.marshal.BytesType,keyValidator=org.apache.cassandra.db.marshal.TimeUUIDType,minCompactionThreshold=4,maxCompactionThreshold=32,columnMetadata={java.nio.HeapByteBuffer[pos=0
lim=11 cap=11]=ColumnDefinition{name=subtask_ids, type=org.apache.cassandra.db.marshal.ListType(org.apache.cassandra.db.marshal.TimeUUIDType),
kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, java.nio.HeapByteBuffer[pos=0
lim=11 cap=11]=ColumnDefinition{name=is_complete, type=org.apache.cassandra.db.marshal.BooleanType,
kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, java.nio.HeapByteBuffer[pos=0
lim=12 cap=12]=ColumnDefinition{name=is_top_level, type=org.apache.cassandra.db.marshal.BooleanType,
kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, java.nio.HeapByteBuffer[pos=0
lim=7 cap=7]=ColumnDefinition{name=task_id, type=org.apache.cassandra.db.marshal.TimeUUIDType,
kind=PARTITION_KEY, componentIndex=null, indexName=null, indexType=null}, java.nio.HeapByteBuffer[pos=0
lim=7 cap=7]=ColumnDefinition{name=user_id, type=org.apache.cassandra.db.marshal.TimeUUIDType,
kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, java.nio.HeapByteBuffer[pos=0
lim=16 cap=16]=ColumnDefinition{name=task_description, type=org.apache.cassandra.db.marshal.UTF8Type,
kind=REGULAR, componentIndex=0, indexName=null, indexType=null}},compactionStrategyClass=class
org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy,compactionStrategyOptions={},compressionOptions={sstable_compression=org.apache.cassandra.io.compress.LZ4Compressor},bloomFilterFpChance=0.01,memtable_flush_period_in_ms=0,caching=KEYS_ONLY,defaultTimeToLive=0,speculative_retry=99.0PERCENTILE,indexInterval=128,populateIoCacheOnFlush=false,droppedColumns={task_order=1387580698664000},triggers={}]
> ERROR [Thrift:4] 2013-12-20 16:04:58,672 CustomTThreadPoolServer.java:212 - Error occurred
during processing of message.
> java.lang.ClassCastException: java.lang.Long cannot be cast to java.util.Map
> 	at org.apache.cassandra.serializers.MapSerializer.serialize(MapSerializer.java:27) ~[main/:na]
> 	at org.apache.cassandra.db.marshal.AbstractType.decompose(AbstractType.java:71) ~[main/:na]
> 	at org.apache.cassandra.db.CFRowAdder.add(CFRowAdder.java:78) ~[main/:na]
> 	at org.apache.cassandra.db.CFRowAdder.addMapEntry(CFRowAdder.java:65) ~[main/:na]
> 	at org.apache.cassandra.config.CFMetaData.toSchemaNoColumnsNoTriggers(CFMetaData.java:1610)
~[main/:na]
> 	at org.apache.cassandra.config.CFMetaData.toSchemaUpdate(CFMetaData.java:1483) ~[main/:na]
> 	at org.apache.cassandra.service.MigrationManager.announceColumnFamilyUpdate(MigrationManager.java:264)
~[main/:na]
> 	at org.apache.cassandra.cql3.statements.AlterTableStatement.announceMigration(AlterTableStatement.java:217)
~[main/:na]
> 	at org.apache.cassandra.cql3.statements.SchemaAlteringStatement.execute(SchemaAlteringStatement.java:71)
~[main/:na]
> 	at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:194)
~[main/:na]
> 	at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:228) ~[main/:na]
> 	at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:218) ~[main/:na]
> 	at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1966)
~[main/:na]
> 	at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4486)
~[thrift/:na]
> 	at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4470)
~[thrift/:na]
> 	at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) ~[libthrift-0.9.1.jar:0.9.1]
> 	at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) ~[libthrift-0.9.1.jar:0.9.1]
> 	at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:194)
~[main/:na]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_45]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_45]
> 	at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Mime
View raw message