Details
Description
Creating a CF in cqlsh -3
CREATE COLUMNFAMILY ads_config (c_id uuid, ct_id uuid, pt_id uuid, c_type int, creat blob, start timestamp, end timestamp, total int, pending int, PRIMARY KEY ( campaign_id, creat_id, placement_id));
INSERT INTO works fine. SELECT * works fine.
ALTER TABLE ads_config add cost int;
SELECT * works fine, new field is null.
ALTER TABLE ads_config drop cost;
Gives a:
TSocket read 0 bytes
Closing and reopening cql works fine. The column key exists and can't be dropped.
Error log: INFO 12:08:40,632 Enqueuing flush of Memtable-schema_columnfamilies@445620464(1428/1785 serialized/live bytes, 20 ops) INFO 12:08:40,633 Writing Memtable-schema_columnfamilies@445620464(1428/1785 serialized/live bytes, 20 ops) INFO 12:08:40,696 Completed flushing /var/lib/cassandra/data/system/schema_columnfamilies/system-schema_columnfamilies-hd-4-Data.db (1487 bytes) for commitlog position ReplayPosition(segmentId=180414134565599, position=11928) INFO 12:08:40,697 Enqueuing flush of Memtable-schema_columns@1158801519(222/277 serialized/live bytes, 4 ops) INFO 12:08:40,697 Writing Memtable-schema_columns@1158801519(222/277 serialized/live bytes, 4 ops) INFO 12:08:40,704 Compacting [SSTableReader(path='/var/lib/cassandra/data/system/schema_columnfamilies/system-schema_columnfamilies-hd-1-Data.db'), SSTableReader(path='/var/lib/cassandra/data/system/schema_columnfamilies/system-schema_columnfamilies-hd-3-Data.db'), SSTableReader(path='/var/lib/cassandra/data/system/schema_columnfamilies/system-schema_columnfamilies-hd-2-Data.db'), SSTableReader(path='/var/lib/cassandra/data/system/schema_columnfamilies/system-schema_columnfamilies-hd-4-Data.db')] INFO 12:08:40,731 Completed flushing /var/lib/cassandra/data/system/schema_columns/system-schema_columns-hd-4-Data.db (273 bytes) for commitlog position ReplayPosition(segmentId=180414134565599, position=11928) INFO 12:08:40,761 Compacted to [/var/lib/cassandra/data/system/schema_columnfamilies/system-schema_columnfamilies-hd-5-Data.db,]. 5,892 to 2,855 (~48% of original) bytes for 1 keys at 0.050421MB/s. Time: 54ms. ERROR 12:08:40,780 Exception in thread Thread[MigrationStage:1,5,main] java.lang.NullPointerException at org.apache.cassandra.utils.ByteBufferUtil.string(ByteBufferUtil.java:167) at org.apache.cassandra.utils.ByteBufferUtil.string(ByteBufferUtil.java:124) at org.apache.cassandra.cql.jdbc.JdbcUTF8.getString(JdbcUTF8.java:77) at org.apache.cassandra.cql.jdbc.JdbcUTF8.compose(JdbcUTF8.java:97) at org.apache.cassandra.db.marshal.UTF8Type.compose(UTF8Type.java:35) at org.apache.cassandra.cql3.UntypedResultSet$Row.getString(UntypedResultSet.java:87) at org.apache.cassandra.config.ColumnDefinition.fromSchema(ColumnDefinition.java:256) at org.apache.cassandra.config.CFMetaData.addColumnDefinitionSchema(CFMetaData.java:1293) at org.apache.cassandra.config.CFMetaData.fromSchema(CFMetaData.java:1225) at org.apache.cassandra.config.KSMetaData.deserializeColumnFamilies(KSMetaData.java:294) at org.apache.cassandra.db.DefsTable.mergeColumnFamilies(DefsTable.java:396) at org.apache.cassandra.db.DefsTable.mergeSchema(DefsTable.java:271) at org.apache.cassandra.service.MigrationManager$1.call(MigrationManager.java:211) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) ERROR 12:08:40,779 Error occurred during processing of message. java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NullPointerException at org.apache.cassandra.utils.FBUtilities.waitOnFuture(FBUtilities.java:373) at org.apache.cassandra.service.MigrationManager.announce(MigrationManager.java:188) at org.apache.cassandra.service.MigrationManager.announceColumnFamilyUpdate(MigrationManager.java:161) at org.apache.cassandra.cql3.statements.AlterTableStatement.announceMigration(AlterTableStatement.java:148) at org.apache.cassandra.cql3.statements.SchemaAlteringStatement.execute(SchemaAlteringStatement.java:99) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:108) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:121) at org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1237) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3542) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3530) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:186) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222) at java.util.concurrent.FutureTask.get(FutureTask.java:83) at org.apache.cassandra.utils.FBUtilities.waitOnFuture(FBUtilities.java:369) ... 15 more Caused by: java.lang.NullPointerException at org.apache.cassandra.utils.ByteBufferUtil.string(ByteBufferUtil.java:167) at org.apache.cassandra.utils.ByteBufferUtil.string(ByteBufferUtil.java:124) at org.apache.cassandra.cql.jdbc.JdbcUTF8.getString(JdbcUTF8.java:77) at org.apache.cassandra.cql.jdbc.JdbcUTF8.compose(JdbcUTF8.java:97) at org.apache.cassandra.db.marshal.UTF8Type.compose(UTF8Type.java:35) at org.apache.cassandra.cql3.UntypedResultSet$Row.getString(UntypedResultSet.java:87) at org.apache.cassandra.config.ColumnDefinition.fromSchema(ColumnDefinition.java:256) at org.apache.cassandra.config.CFMetaData.addColumnDefinitionSchema(CFMetaData.java:1293) at org.apache.cassandra.config.CFMetaData.fromSchema(CFMetaData.java:1225) at org.apache.cassandra.config.KSMetaData.deserializeColumnFamilies(KSMetaData.java:294) at org.apache.cassandra.db.DefsTable.mergeColumnFamilies(DefsTable.java:396) at org.apache.cassandra.db.DefsTable.mergeSchema(DefsTable.java:271) at org.apache.cassandra.service.MigrationManager$1.call(MigrationManager.java:211) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) ... 3 more INFO 12:08:40,791 Compacting [SSTableReader(path='/var/lib/cassandra/data/system/schema_columns/system-schema_columns-hd-2-Data.db'), SSTableReader(path='/var/lib/cassandra/data/system/schema_columns/system-schema_columns-hd-1-Data.db'), SSTableReader(path='/var/lib/cassandra/data/system/schema_columns/system-schema_columns-hd-3-Data.db'), SSTableReader(path='/var/lib/cassandra/data/system/schema_columns/system-schema_columns-hd-4-Data.db')] INFO 12:08:40,856 Compacted to [/var/lib/cassandra/data/system/schema_columns/system-schema_columns-hd-5-Data.db,]. 2,973 to 2,537 (~85% of original) bytes for 1 keys at 0.037223MB/s. Time: 65ms.
(It's my first issue reported, so please, let me know if I'm missing any relevant data ).