cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mck (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-12351) IllegalStateException: empty rows returned when reading system.schema_keyspaces
Date Tue, 02 Aug 2016 11:19:20 GMT


mck commented on CASSANDRA-12351:

{quote}It's true we should probably call removedDeletedCF but I don't think I understand why
not doing so would break LegacySchemaTables. I mean, if removeDeleteldCF makes a difference
compared to just purgeTombstones, that imply the partition is empty and has only purgeable
top-level or range tombstones (those are the only things purgeTombstones removes). But such
partition shouldn't create any result on the CQL front, whether or not we do any purging,
and as UntypedResultSet uses the ResultSet processed by CQL, this shouldn't make any difference
to createKeyspaceFromSchemaPartition.{quote}

It makes a difference when it gets to {{readSchemaFromSystemTables(..)}} and doesn't skip
the "empty" row because {{isEmptySchemaPartition(partition)}} only checks for a null cf. A
quick scan through the code gave me the impression that {{ == null}} was checked in
places while {{! && !isMarkedForDelete()}} wasn't. 

If the code is /sensitive/ in this way maybe adding some assert statements into CF would be
a good idea, like
{{assert hasColumns() || isMarkedForDelete()}}

> IllegalStateException: empty rows returned when reading system.schema_keyspaces
> -------------------------------------------------------------------------------
>                 Key: CASSANDRA-12351
>                 URL:
>             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
> {noformat}
> - Exception encountered during startup
> java.lang.IllegalStateException: One row required, 0 found
> at org.apache.cassandra.cql3.UntypedResultSet$
> at org.apache.cassandra.schema.LegacySchemaTables.createKeyspaceFromSchemaPartition(
> at org.apache.cassandra.schema.LegacySchemaTables.createKeyspaceFromSchemaPartitions(
> at org.apache.cassandra.schema.LegacySchemaTables.readSchemaFromSystemTables(
> at org.apache.cassandra.config.Schema.loadFromDisk( ~[apache-cassandra-2.2.7.jar:2.2.7-SNAPSHOT]
> at org.apache.cassandra.config.Schema.loadFromDisk( ~[apache-cassandra-2.2.7.jar:2.2.7-SNAPSHOT]
> at org.apache.cassandra.service.CassandraDaemon.setup( [apache-cassandra-2.2.7.jar:2.2.7-SNAPSHOT]
> at org.apache.cassandra.service.CassandraDaemon.activate( [apache-cassandra-2.2.7.jar:2.2.7-SNAPSHOT]
> at org.apache.cassandra.service.CassandraDaemon.main( [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|].

This message was sent by Atlassian JIRA

View raw message