cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Yeschenko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-9434) If a node loses schema_columns SSTables it could delete all secondary indexes from the schema
Date Mon, 17 Aug 2015 22:00:46 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-9434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14700301#comment-14700301
] 

Aleksey Yeschenko commented on CASSANDRA-9434:
----------------------------------------------

So, the good news is that this issue will not happen in 2.1, 2.2, or 3.0. In those we assume
that this migration had been performed in 2.0 already. Furthermore, in 3.0 the indexes are
kept in a totally separate table from columns.

The bad news is that 2.0 is EOL and that I don't know a solid heuristic for determining whether
or not we have this data missing. It's possible for a pre-upgrade 2.0 node to have completely
empty {{system.schema_columns}} (sans system tables' columns themselves) table if the system
had no {{REGULAR}} columns defined on any of the tables.

> If a node loses schema_columns SSTables it could delete all secondary indexes from the
schema
> ---------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-9434
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9434
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Richard Low
>            Assignee: Aleksey Yeschenko
>             Fix For: 2.0.x
>
>
> It is possible that a single bad node can delete all secondary indexes if it restarts
and cannot read its schema_columns SSTables. Here's a reproduction:
> * Create a 2 node cluster (we saw it on 2.0.11)
> * Create the schema:
> {code}
> create keyspace myks with replication = {'class':'SimpleStrategy', 'replication_factor':1};
> use myks;
> create table mytable (a text, b text, c text, PRIMARY KEY (a, b) );
> create index myindex on mytable(b);
> {code}
> NB index must be on clustering column to repro
> * Kill one node
> * Wipe its commitlog and system/schema_columns sstables.
> * Start it again
> * Run on this node
> select index_name from system.schema_columns where keyspace_name = 'myks' and columnfamily_name
= 'mytable' and column_name = 'b';
> and you'll see the index is null.
> * Run 'describe schema' on the other node. Sometimes it will not show the index, but
you might need to bounce for it to disappear.
> I think the culprit is SystemKeyspace.copyAllAliasesToColumnsProper.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message