cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan McGuire (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-6598) upgradesstables does not upgrade indexes causing startup error.
Date Thu, 16 Jan 2014 20:51:22 GMT

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

Ryan McGuire commented on CASSANDRA-6598:
-----------------------------------------

The 2.0 patch works, no errors, upgraded to 2.1.

I confirm that the upgrade of indexes past 1.2 is still failing, but there are no errors,
and it appears that 2.0 and 2.1 have no problems loading and dealing with version *ic* (1.2)
indexes.

> upgradesstables does not upgrade indexes causing startup error.
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-6598
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6598
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Ryan McGuire
>            Assignee: Brandon Williams
>         Attachments: 6598-2.0-npe.txt, 6598.txt
>
>
> Upgrading a cluster from 1.1.12 -> 1.2.13 -> 2.0 HEAD fails due to upgradesstables
not upgrading the index files.
> To reproduce:
> {code}
> # Make sure ccm has all the versions we need:
> ccm create -v git:cassandra-2.0 test
> ccm remove 
> ccm create -v git:cassandra-1.2.13 test
> ccm remove
> # Create a 1.1.12 cluster:
> ccm create -v git:cassandra-1.1.12 test
> # Set cluster partitioner:
> perl -p -i -e 's/partitioner: null/partitioner: RandomPartitioner/gi' ~/.ccm/test/cluster.conf
> ccm populate -n 1
> ccm start
> ccm node1 stress -- --operation=INSERT --family-type=Standard --num-keys=10000 --create-index=KEYS
--compression=SnappyCompressor --compaction-strategy=LeveledCompactionStrategy
> ccm flush
> ccm node1 drain
> ccm status
> # Wait until node1 shows DOWN.
> # Set cluster version:
> perl -p -i -e 's/git_cassandra-1.1.12/git_cassandra-1.2.13/gi' ~/.ccm/test/cluster.conf
> # Upgrade node1:
> ccm node1 updateconf
> ccm node1 start
> # Upgrade sstables:
> ~/.ccm/test/node1/bin/nodetool -p 7100 upgradesstables
> ls ~/.ccm/test/node1/data/Keyspace1/Standard1/
> # Note the versions on files. Data has been upgraded to version *ic* but indexes are
left on version *hf*.
> # Upgrade to 2.0:
> ccm flush
> ccm node1 drain
> ccm status
> # Wait until node1 shows DOWN.
> # Set cluster version:
> perl -p -i -e 's/git_cassandra-1.2.13/git_cassandra-2.0/gi' ~/.ccm/test/cluster.conf
> ccm node1 updateconf
> ccm node1 start
> {code}
> On this last upgrade attempt, cassandra 2.0 complains that the version for the indexes
is incorrect:
> {code}
> java.lang.RuntimeException: Can't open incompatible SSTable! Current version jb, found
file: /home/ryan/.ccm/test/node1/data/Keyspace1/Standard1/Keyspace1-Standard1.Idx1-hf-1
>         at org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:411)
>         at org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:393)
>         at org.apache.cassandra.db.index.AbstractSimplePerColumnSecondaryIndex.init(AbstractSimplePerColumnSecondaryIndex.java:52)
>         at org.apache.cassandra.db.index.SecondaryIndexManager.addIndexedColumn(SecondaryIndexManager.java:274)
>         at org.apache.cassandra.db.ColumnFamilyStore.<init>(ColumnFamilyStore.java:279)
>         at org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:416)
>         at org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:388)
>         at org.apache.cassandra.db.Keyspace.initCf(Keyspace.java:309)
>         at org.apache.cassandra.db.Keyspace.<init>(Keyspace.java:266)
>         at org.apache.cassandra.db.Keyspace.open(Keyspace.java:110)
>         at org.apache.cassandra.db.Keyspace.open(Keyspace.java:88)
>         at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:273)
>         at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:462)
>         at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:549)
> {code}
> The same test can be done starting from 1.2 upgrading to 2.0. The index files do not
upgrade in this scenario either, however, there is not the same error, possibly because 2.0
is tolerant of version 1.2 indexes?



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message