Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started



vejamorn_187411 avatar image
vejamorn_187411 asked Erick Ramirez commented

Dropping a table returns "ExecutionException: java.lang.AssertionError"

I have this table

CREATE TABLE messenger.invoice (
    fb_invoice_id text PRIMARY KEY,
    cmz_invoice_id text,
    domain text,
    page_id text,
    resend int,
    status text,
    time int,
    transfer_slip text
) WITH bloom_filter_fp_chance = 0.01
    AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
    AND comment = ''
    AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}
    AND compression = {'chunk_length_in_kb': '64', 'class': ''}
    AND crc_check_chance = 1.0
    AND dclocal_read_repair_chance = 0.1
    AND default_time_to_live = 0
    AND gc_grace_seconds = 864000
    AND max_index_interval = 2048
    AND memtable_flush_period_in_ms = 0
    AND min_index_interval = 128
    AND read_repair_chance = 0.0
    AND speculative_retry = '99PERCENTILE';

when I want to drop this table

drop table messenger.invoice

Console show error like this

ServerError: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.AssertionError

I'm very new to cassandra and I tried very hard to find the way to fix this problem. Now I read a lot of post and some post suggest to restart service but some post point that this structure problem may cause restart failed. I'm very worry because this happen in production environment.

Thanks in advance.

10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

tim.steele avatar image
tim.steele answered Erick Ramirez commented

Hi vejamorn_187411 , the syntax you are using to drop the table is correct. Can you answer a few more questions to provide some more context to this not working:

- is everything else working ok in the cluster?
- how many nodes are in your cluster?
- have you tried running this drop table from other nodes?
- have you performed any upgrades recently?
- can you tell us how you are executing the drop table, ie: are you using cqlsh or another client?
- have you looked in the system.log to see if there are any messages being logged at the time you are attempting the drop table?
- are there more lines to this exception message, if so can you please provide them
- I gather you've been trying to drop this table for some time since you've mentioned reading other posts, are there any other tables you've been successful in dropping if you had tried?
- what version of cassandra do you have deployed?


8 comments Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

My responses:

  • Everything OK except do something about db structure (create, drop, alter). Yes you see it right, even create another table I still can't.
  • 1 node in my cluster
  • No. Because I have only 1 node and didn't try to drop other table because every table is production and I can't create new table to try to drop table.
  • We're running 3.10 and never upgrade for long time (with a little experience of cassandra usage, we avoid to do everything that may cause service failed to restart)

I hope this info help to understand my problem better.

0 Likes 0 ·

@vejamorn_187411 Just a friendly note that I've converted your post into a comment since it is not an "answer". Cheers!

1 Like 1 ·

Thank you very much.

0 Likes 0 ·
INFO  [Native-Transport-Requests-1] 2020-04-04 09:02:35,600 - Drop table 'messenger/invoice'
ERROR [MigrationStage:1] 2020-04-04 09:02:35,601 - Exception in thread Thread[MigrationStage:1,5,main]
java.lang.AssertionError: null
 at io.netty.util.Recycler$WeakOrderQueue.<init>( ~[netty-all-4.0.39.Final.jar:4.0.39.Final]
 at io.netty.util.Recycler$DefaultHandle.recycle( ~[netty-all-4.0.39.Final.jar:4.0.39.Final]
 at io.netty.util.Recycler.recycle( ~[netty-all-4.0.39.Final.jar:4.0.39.Final]
 at org.apache.cassandra.utils.btree.BTree$Builder.recycle( ~[apache-cassandra-3.10.jar:3.10]
 at org.apache.cassandra.utils.btree.BTree$ ~[apache-cassandra-3.10.jar:3.10]
 at ~[apache-cassandra-3.10.jar:3.10]
0 Likes 0 ·
 at org.apache.cassandra.db.partitions.PartitionUpdate.maybeBuild( ~[apache-cassandra-3.10.jar:3.10]
 at org.apache.cassandra.db.partitions.PartitionUpdate.holder( ~[apache-cassandra-3.10.jar:3.10]
 at org.apache.cassandra.db.partitions.AbstractBTreePartition.unfilteredIterator( ~[apache-cassandra-3.10.jar:3.10]
 at org.apache.cassandra.db.partitions.AbstractBTreePartition.unfilteredIterator( ~[apache-cassandra-3.10.jar:3.10]
 at org.apache.cassandra.db.partitions.PartitionUpdate$PartitionUpdateSerializer.serialize( ~[apache-cassandra-3.10.jar:3.10]
 at org.apache.cassandra.db.Mutation$MutationSerializer.serialize( ~[apache-cassandra-3.10.jar:3.10]
 at org.apache.cassandra.db.commitlog.CommitLog.add( ~[apache-cassandra-3.10.jar:3.10]

0 Likes 0 ·
 at org.apache.cassandra.db.Keyspace.applyInternal( ~[apache-cassandra-3.10.jar:3.10]
 at org.apache.cassandra.db.Keyspace.apply( ~[apache-cassandra-3.10.jar:3.10]
 at org.apache.cassandra.db.Mutation.apply( ~[apache-cassandra-3.10.jar:3.10]
 at org.apache.cassandra.db.Mutation.apply( ~[apache-cassandra-3.10.jar:3.10]
 at org.apache.cassandra.db.Mutation.apply( ~[apache-cassandra-3.10.jar:3.10]
 at java.util.Collections$SingletonList.forEach( ~[na:1.8.0_121]
 at org.apache.cassandra.schema.SchemaKeyspace.mergeSchema( ~[apache-cassandra-3.10.jar:3.10]
 at org.apache.cassandra.schema.SchemaKeyspace.mergeSchemaAndAnnounceVersion( ~[apache-cassandra-3.10.jar:3.10]
 at org.apache.cassandra.service.MigrationManager$1.runMayThrow( ~[apache-cassandra-3.10.jar:3.10]
0 Likes 0 ·

@tim.steele I have provided some answer to you in comment. Any idea to fix this problem? Thanks.

0 Likes 0 ·

The assertion error here suggests that maybe the table doesn't exist:

ERROR [MigrationStage:1] 2020-04-04 09:02:35,601 - Exception in thread Thread[MigrationStage:1,5,main]
java.lang.AssertionError: null

Is there any more output in your cqlsh session other than this?

ServerError: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.AssertionError

Please post the FULL cqlsh output immediately after this command:

cqlsh> DROP TABLE messenger.invoice;
0 Likes 0 ·