[ https://issues.apache.org/jira/browse/CASSANDRA-7823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14129260#comment-14129260 ]
Tyler Hobbs commented on CASSANDRA-7823: ---------------------------------------- Does this happen consistently for you? It shouldn't actually get to the point where the error occurs if the keyspace doesn't exist. > IllegalStateException with DROP KEYSPACE IF EXISTS XXX > ------------------------------------------------------ > > Key: CASSANDRA-7823 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7823 > Project: Cassandra > Issue Type: Bug > Components: Core > Reporter: Benoit Lacelle > > It happens on Cassandra 2.0.9 (production server) but not in my local > envirnment (2.0.6). > When executing "DROP KEYSPACE IF EXISTS XXX" on an unexisting keyspace, I get > : > In CQLSH: > {code} > Traceback (most recent call last): > File "/usr/bin/cqlsh", line 930, in perform_statement_untraced > self.cursor.execute(statement, decoder=decoder) > File > "/usr/share/cassandra/lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cursor.py", > line 80, in execute > response = self.get_response(prepared_q, cl) > File > "/usr/share/cassandra/lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/thrifteries.py", > line 77, in get_response > return self.handle_cql_execution_errors(doquery, compressed_q, compress, > cl) > File > "/usr/share/cassandra/lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/thrifteries.py", > line 96, in handle_cql_execution_errors > return executor(*args, **kwargs) > File > "/usr/share/cassandra/lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cassandra/Cassandra.py", > line 1830, in execute_cql3_query > self.send_execute_cql3_query(query, compression, consistency) > File > "/usr/share/cassandra/lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cassandra/Cassandra.py", > line 1841, in send_execute_cql3_query > self._oprot.trans.flush() > File > "/usr/share/cassandra/lib/thrift-python-internal-only-0.9.1.zip/thrift/transport/TTransport.py", > line 292, in flush > self.__trans.write(buf) > File > "/usr/share/cassandra/lib/thrift-python-internal-only-0.9.1.zip/thrift/transport/TSocket.py", > line 128, in write > plus = self.handle.send(buff) > error: [Errno 32] Broken pipe > {code} > In system.log: > {code} > ERROR [Thrift:3] 2014-08-24 22:53:02,242 CustomTThreadPoolServer.java (line > 219) Error occurred during processing of message. > java.lang.RuntimeException: java.util.concurrent.ExecutionException: > java.lang.IllegalStateException: One row required, 0 found > at > org.apache.cassandra.utils.FBUtilities.waitOnFuture(FBUtilities.java:413) > at > org.apache.cassandra.service.MigrationManager.announce(MigrationManager.java:285) > at > org.apache.cassandra.service.MigrationManager.announceKeyspaceDrop(MigrationManager.java:259) > at > org.apache.cassandra.cql3.statements.DropKeyspaceStatement.announceMigration(DropKeyspaceStatement.java:62) > at > org.apache.cassandra.cql3.statements.SchemaAlteringStatement.execute(SchemaAlteringStatement.java:71) > at > org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:158) > at > org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:175) > at > org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1958) > at > org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4486) > at > org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4470) > at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) > at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) > at > org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:201) > 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:744) > Caused by: java.util.concurrent.ExecutionException: > java.lang.IllegalStateException: One row required, 0 found > at java.util.concurrent.FutureTask.report(FutureTask.java:122) > at java.util.concurrent.FutureTask.get(FutureTask.java:188) > at > org.apache.cassandra.utils.FBUtilities.waitOnFuture(FBUtilities.java:409) > ... 15 more > Caused by: java.lang.IllegalStateException: One row required, 0 found > at > org.apache.cassandra.cql3.UntypedResultSet.one(UntypedResultSet.java:53) > at > org.apache.cassandra.config.KSMetaData.fromSchema(KSMetaData.java:263) > at > org.apache.cassandra.db.DefsTables.mergeKeyspaces(DefsTables.java:227) > at org.apache.cassandra.db.DefsTables.mergeSchema(DefsTables.java:182) > at > org.apache.cassandra.service.MigrationManager$2.runMayThrow(MigrationManager.java:303) > at > org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) > at java.util.concurrent.FutureTask.run(FutureTask.java:262) > ... 3 more > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)