You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Aurynn Shaw <as...@wetafx.co.nz> on 2011/08/06 01:22:25 UTC

Secondary indexes and drop column family

Hey all;

So, I've managed to get myself into a position where I'm not sure how to 
recover.

I have a column family that I was a significant number of secondary 
indexes on. Some buggy code created a bunch of useless indexes 
accidentally, and I took what (at the time) seemed the most obvious path:

Drop the column family, recreate it, and reconstruct the indexes from 
existing data with a known-working script.

However, now that I've done this, I'm getting:
InvalidRequestException(why='Duplicate index names 
<CFName>.6d62783a646f635f6964')

when I run the script that generates the secondary indexes.

Since the CF got dropped and recreated, I can't iterate it to delete the 
indexes, since they're not there anymore.

How do I go about recovering from this? I suspect that ithe name is 
being held somewhere in the system keyspace, but I'm not sure where to look.

I'm using Cassandra 0.7.4, RF=1.

Thanks,
Aurynn



Re: Secondary indexes and drop column family

Posted by Jonathan Ellis <jb...@gmail.com>.
Upgrade. https://issues.apache.org/jira/browse/CASSANDRA-2320

On Fri, Aug 5, 2011 at 6:58 PM, Aurynn Shaw <as...@wetafx.co.nz> wrote:
> Answered my own question; a snapshot gets taken when you drop a CF, per:
>
> http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Cassandra-take-a-snapshot-after-a-column-family-update-td6222772.html
>
> So, I can recover to a known-good working position, and delete my indices
> properly.
>
> Thanks!
> ~A
>
> On 06/08/11 11:22, Aurynn Shaw wrote:
>>
>> Hey all;
>>
>> So, I've managed to get myself into a position where I'm not sure how to
>> recover.
>>
>> I have a column family that I was a significant number of secondary
>> indexes on. Some buggy code created a bunch of useless indexes accidentally,
>> and I took what (at the time) seemed the most obvious path:
>>
>> Drop the column family, recreate it, and reconstruct the indexes from
>> existing data with a known-working script.
>>
>> However, now that I've done this, I'm getting:
>> InvalidRequestException(why='Duplicate index names
>> <CFName>.6d62783a646f635f6964')
>>
>> when I run the script that generates the secondary indexes.
>>
>> Since the CF got dropped and recreated, I can't iterate it to delete the
>> indexes, since they're not there anymore.
>>
>> How do I go about recovering from this? I suspect that ithe name is being
>> held somewhere in the system keyspace, but I'm not sure where to look.
>>
>> I'm using Cassandra 0.7.4, RF=1.
>>
>> Thanks,
>> Aurynn
>>
>>
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com

Re: Secondary indexes and drop column family

Posted by Aurynn Shaw <as...@wetafx.co.nz>.
Answered my own question; a snapshot gets taken when you drop a CF, per:

http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Cassandra-take-a-snapshot-after-a-column-family-update-td6222772.html

So, I can recover to a known-good working position, and delete my 
indices properly.

Thanks!
~A

On 06/08/11 11:22, Aurynn Shaw wrote:
> Hey all;
>
> So, I've managed to get myself into a position where I'm not sure how 
> to recover.
>
> I have a column family that I was a significant number of secondary 
> indexes on. Some buggy code created a bunch of useless indexes 
> accidentally, and I took what (at the time) seemed the most obvious path:
>
> Drop the column family, recreate it, and reconstruct the indexes from 
> existing data with a known-working script.
>
> However, now that I've done this, I'm getting:
> InvalidRequestException(why='Duplicate index names 
> <CFName>.6d62783a646f635f6964')
>
> when I run the script that generates the secondary indexes.
>
> Since the CF got dropped and recreated, I can't iterate it to delete 
> the indexes, since they're not there anymore.
>
> How do I go about recovering from this? I suspect that ithe name is 
> being held somewhere in the system keyspace, but I'm not sure where to 
> look.
>
> I'm using Cassandra 0.7.4, RF=1.
>
> Thanks,
> Aurynn
>
>