Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 81BA7200B65 for ; Tue, 2 Aug 2016 13:38:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 80777160A76; Tue, 2 Aug 2016 11:38:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C8D91160A8C for ; Tue, 2 Aug 2016 13:38:21 +0200 (CEST) Received: (qmail 91925 invoked by uid 500); 2 Aug 2016 11:38:21 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 91766 invoked by uid 99); 2 Aug 2016 11:38:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2016 11:38:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id BA6CF2C0D5D for ; Tue, 2 Aug 2016 11:38:20 +0000 (UTC) Date: Tue, 2 Aug 2016 11:38:20 +0000 (UTC) From: "mck (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-12351) IllegalStateException: empty rows returned when reading system.schema_keyspaces MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 02 Aug 2016 11:38:22 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-12351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15403811#comment-15403811 ] mck commented on CASSANDRA-12351: --------------------------------- {quote}If the code is /sensitive/ in this way maybe adding some assert statements into CFS would be a good idea, like assert cf == null || cf.hasColumns() || cf.isMarkedForDelete(){quote} I take that back. This code is all over the place. It's a shame that CF can have multiple states representing the same thing. I can apply the patch, along with a unit test. But a number of tests in ColumnFamilyStoreTest needs adjustment. I can apply a different patch, one that improves {{isEmptySchemaPartition(partition)}}. Or you [~slebresne] can revert CASSANDRA-11427. > IllegalStateException: empty rows returned when reading system.schema_keyspaces > ------------------------------------------------------------------------------- > > Key: CASSANDRA-12351 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12351 > Project: Cassandra > Issue Type: Bug > Components: Local Write-Read Paths > Reporter: mck > Assignee: mck > > After 2.2.6 the following error is thrown during startup, resulting in Cassandra not starting. > {noformat} > CassandraDaemon.java:644 - Exception encountered during startup > java.lang.IllegalStateException: One row required, 0 found > at org.apache.cassandra.cql3.UntypedResultSet$FromResultSet.one(UntypedResultSet.java:77) ~[apache-cassandra-2.2.7.jar:2.2.7-SNAPSHOT] > at org.apache.cassandra.schema.LegacySchemaTables.createKeyspaceFromSchemaPartition(LegacySchemaTables.java:758) ~[apache-cassandra-2.2.7.jar:2.2.7-SNAPSHOT] > at org.apache.cassandra.schema.LegacySchemaTables.createKeyspaceFromSchemaPartitions(LegacySchemaTables.java:737) ~[apache-cassandra-2.2.7.jar:2.2.7-SNAPSHOT] > at org.apache.cassandra.schema.LegacySchemaTables.readSchemaFromSystemTables(LegacySchemaTables.java:219) ~[apache-cassandra-2.2.7.jar:2.2.7-SNAPSHOT] > at org.apache.cassandra.config.Schema.loadFromDisk(Schema.java:117) ~[apache-cassandra-2.2.7.jar:2.2.7-SNAPSHOT] > at org.apache.cassandra.config.Schema.loadFromDisk(Schema.java:107) ~[apache-cassandra-2.2.7.jar:2.2.7-SNAPSHOT] > at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:215) [apache-cassandra-2.2.7.jar:2.2.7-SNAPSHOT] > at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:522) [apache-cassandra-2.2.7.jar:2.2.7-SNAPSHOT] > at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:631) [apache-cassandra-2.2.7.jar:2.2.7-SNAPSHOT] > {noformat} > In {{LegacySchemaTables.readSchemaFromSystemTables(..)}} the call to {{getSchemaPartitionsForTable(KEYSPACES)}} is now (since 2.2.6) returning more rows. The additional rows are empty. > These rows are coming out of the row iterator post 2.2.6, where they were not in 2.2.6. > This issue was raised on the mailing list [here|http://mail-archives.apache.org/mod_mbox/cassandra-user/201607.mbox/%3C776766150.5940472.1469733214785.JavaMail.yahoo@mail.yahoo.com%3E]. -- This message was sent by Atlassian JIRA (v6.3.4#6332)