You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Boris Yen <yu...@gmail.com> on 2011/07/15 11:55:13 UTC

Default behavior of generate index_name for columns...

Hi,

I have a few column families, each has a column called user_name. I tried to
use secondary index on user_name column for each of the column family.
However, when creating these column families, cassandra keeps reporting
"Duplicate index name..." exception. I finally figured out that it seems the
default index name is "column name"+"_idx", this make my column family
violate the "uniqueness of index name" rule.

I was wondering if the default index_name generating rule could be like
"column name"+"cf name", so the index name would not collide with each other
that easily, if the user do not assign "index_name" when creating a column
family.

Regards
Boris

Re: Default behavior of generate index_name for columns...

Posted by David Boxenhorn <da...@citypath.com>.
It would be nice if this were fixed before I move up to 0.8...

On Mon, Jul 18, 2011 at 3:19 PM, Boris Yen <yu...@gmail.com> wrote:

> If it would not cause the dev team to much trouble, I think the cassandra
> should maintain the backward compatability regarding the generation of the
> default index_name, otherwise when people start dropping columns indices,
> the result might not be what they want.
>
>
> On Mon, Jul 18, 2011 at 7:59 PM, Jonathan Ellis <jb...@gmail.com> wrote:
>
>> On Mon, Jul 18, 2011 at 12:20 AM, Boris Yen <yu...@gmail.com> wrote:
>> > Will this have any side effect when doing a get_indexed_slices
>>
>> No
>>
>> > or when a
>> > user wants to drop an index by any means?
>>
>> Sort of; one of the indexes with the name will be dropped, but not all.
>>
>> --
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of DataStax, the source for professional Cassandra support
>> http://www.datastax.com
>>
>
>

Re: Default behavior of generate index_name for columns...

Posted by Boris Yen <yu...@gmail.com>.
If it would not cause the dev team to much trouble, I think the cassandra
should maintain the backward compatability regarding the generation of the
default index_name, otherwise when people start dropping columns indices,
the result might not be what they want.

On Mon, Jul 18, 2011 at 7:59 PM, Jonathan Ellis <jb...@gmail.com> wrote:

> On Mon, Jul 18, 2011 at 12:20 AM, Boris Yen <yu...@gmail.com> wrote:
> > Will this have any side effect when doing a get_indexed_slices
>
> No
>
> > or when a
> > user wants to drop an index by any means?
>
> Sort of; one of the indexes with the name will be dropped, but not all.
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com
>

Re: Default behavior of generate index_name for columns...

Posted by Jonathan Ellis <jb...@gmail.com>.
On Mon, Jul 18, 2011 at 12:20 AM, Boris Yen <yu...@gmail.com> wrote:
> Will this have any side effect when doing a get_indexed_slices

No

> or when a
> user wants to drop an index by any means?

Sort of; one of the indexes with the name will be dropped, but not all.

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

Re: Default behavior of generate index_name for columns...

Posted by David Boxenhorn <da...@citypath.com>.
Ah, that's it. I'm on 0.7

On Mon, Jul 18, 2011 at 1:27 PM, Boris Yen <yu...@gmail.com> wrote:

> which version of cassandra do you use? What I mentioned here only happens
> on 0.8.1.
>
>
> On Mon, Jul 18, 2011 at 4:44 PM, David Boxenhorn <da...@citypath.com>wrote:
>
>> I have lots of indexes on columns with the same name. Why don't I have
>> this problem?
>>
>> For example:
>>
>> Keyspace: City:
>>   Replication Strategy: org.apache.cassandra.locator.SimpleStrategy
>>     Replication Factor: 3
>>   Column Families:
>>     ColumnFamily: AttractionCheckins
>>       Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
>>       Row cache size / save period: 0.0/0
>>       Key cache size / save period: 0.1/14400
>>       Memtable thresholds: 0.3/64/60
>>       GC grace seconds: 864000
>>       Compaction min/max thresholds: 4/64
>>       Read repair chance: 0.01
>>       Column Metadata:
>>         Column Name: 09partition (09partition)
>>           Validation Class: org.apache.cassandra.db.marshal.UTF8Type
>>           Index Type: KEYS
>>     ColumnFamily: Attractions
>>       Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
>>       Row cache size / save period: 30000.0/14400
>>       Key cache size / save period: 30000.0/14400
>>       Memtable thresholds: 0.3/64/60
>>       GC grace seconds: 864000
>>       Compaction min/max thresholds: 4/64
>>       Read repair chance: 0.01
>>       Column Metadata:
>>         Column Name: 09partition (09partition)
>>           Validation Class: org.apache.cassandra.db.marshal.UTF8Type
>>           Index Type: KEYS
>>     ColumnFamily: CityResources
>>       Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
>>       Row cache size / save period: 5000.0/14400
>>       Key cache size / save period: 5000.0/14400
>>       Memtable thresholds: 0.3/64/60
>>       GC grace seconds: 864000
>>       Compaction min/max thresholds: 4/64
>>       Read repair chance: 0.01
>>       Column Metadata:
>>         Column Name: 09partition (09partition)
>>           Validation Class: org.apache.cassandra.db.marshal.UTF8Type
>>           Index Type: KEYS
>>
>>
>> On Mon, Jul 18, 2011 at 8:20 AM, Boris Yen <yu...@gmail.com> wrote:
>>
>>> Will this have any side effect when doing a get_indexed_slices or when a
>>> user wants to drop an index by any means?
>>>
>>> Boris
>>>
>>>
>>> On Mon, Jul 18, 2011 at 1:13 PM, Jonathan Ellis <jb...@gmail.com>wrote:
>>>
>>>> 0.8.0 didn't check for name conflicts correctly.  0.8.1 does, but it
>>>> can't fix the ones 0.8.0 allowed, retroactively.
>>>>
>>>> On Sun, Jul 17, 2011 at 11:52 PM, Boris Yen <yu...@gmail.com> wrote:
>>>> > I have tested another case, not sure if this is a bug.
>>>> > I created a few column families on 0.8.0 each has user_name column, in
>>>> > addition, I also enabled secondary index on this column.  Then, I
>>>> upgraded
>>>> > to 0.8.1, when I used cassandra-cli: show keyspaces, I saw index name
>>>> > "user_name_idx" appears for different columns families. It seems the
>>>> > validation rule for index_name on 0.8.1 has been skipped completely.
>>>> >
>>>> > Is this a bug? or is it intentional?
>>>> > Regards
>>>> > Boris
>>>> > On Sat, Jul 16, 2011 at 10:38 AM, Boris Yen <yu...@gmail.com>
>>>> wrote:
>>>> >>
>>>> >> Done. It is CASSANDRA-2903.
>>>> >> On Sat, Jul 16, 2011 at 9:44 AM, Jonathan Ellis <jb...@gmail.com>
>>>> wrote:
>>>> >>>
>>>> >>> Please.
>>>> >>>
>>>> >>> On Fri, Jul 15, 2011 at 7:29 PM, Boris Yen <yu...@gmail.com>
>>>> wrote:
>>>> >>> > Hi Jonathan,
>>>> >>> > Do I need to open a ticket for this?
>>>> >>> > Regards
>>>> >>> > Boris
>>>> >>> >
>>>> >>> > On Sat, Jul 16, 2011 at 6:29 AM, Jonathan Ellis <
>>>> jbellis@gmail.com>
>>>> >>> > wrote:
>>>> >>> >>
>>>> >>> >> Sounds reasonable to me.
>>>> >>> >>
>>>> >>> >> On Fri, Jul 15, 2011 at 2:55 AM, Boris Yen <yu...@gmail.com>
>>>> wrote:
>>>> >>> >> > Hi,
>>>> >>> >> > I have a few column families, each has a column called
>>>> user_name. I
>>>> >>> >> > tried to
>>>> >>> >> > use secondary index on user_name column for each of the column
>>>> >>> >> > family.
>>>> >>> >> > However, when creating these column families, cassandra keeps
>>>> >>> >> > reporting
>>>> >>> >> > "Duplicate index name..." exception. I finally figured out that
>>>> it
>>>> >>> >> > seems
>>>> >>> >> > the
>>>> >>> >> > default index name is "column name"+"_idx", this make my column
>>>> >>> >> > family
>>>> >>> >> > violate the "uniqueness of index name" rule.
>>>> >>> >> > I was wondering if the default index_name generating rule could
>>>> be
>>>> >>> >> > like
>>>> >>> >> > "column name"+"cf name", so the index name would not collide
>>>> with
>>>> >>> >> > each
>>>> >>> >> > other
>>>> >>> >> > that easily, if the user do not assign "index_name" when
>>>> creating a
>>>> >>> >> > column
>>>> >>> >> > family.
>>>> >>> >> > Regards
>>>> >>> >> > Boris
>>>> >>> >> >
>>>> >>> >>
>>>> >>> >>
>>>> >>> >>
>>>> >>> >> --
>>>> >>> >> Jonathan Ellis
>>>> >>> >> Project Chair, Apache Cassandra
>>>> >>> >> co-founder of DataStax, the source for professional Cassandra
>>>> support
>>>> >>> >> http://www.datastax.com
>>>> >>> >
>>>> >>> >
>>>> >>>
>>>> >>>
>>>> >>>
>>>> >>> --
>>>> >>> Jonathan Ellis
>>>> >>> Project Chair, Apache Cassandra
>>>> >>> co-founder of DataStax, the source for professional Cassandra
>>>> support
>>>> >>> http://www.datastax.com
>>>> >>
>>>> >
>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>> Jonathan Ellis
>>>> Project Chair, Apache Cassandra
>>>> co-founder of DataStax, the source for professional Cassandra support
>>>> http://www.datastax.com
>>>>
>>>
>>>
>>
>

Re: Default behavior of generate index_name for columns...

Posted by Boris Yen <yu...@gmail.com>.
which version of cassandra do you use? What I mentioned here only happens on
0.8.1.


On Mon, Jul 18, 2011 at 4:44 PM, David Boxenhorn <da...@citypath.com> wrote:

> I have lots of indexes on columns with the same name. Why don't I have this
> problem?
>
> For example:
>
> Keyspace: City:
>   Replication Strategy: org.apache.cassandra.locator.SimpleStrategy
>     Replication Factor: 3
>   Column Families:
>     ColumnFamily: AttractionCheckins
>       Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
>       Row cache size / save period: 0.0/0
>       Key cache size / save period: 0.1/14400
>       Memtable thresholds: 0.3/64/60
>       GC grace seconds: 864000
>       Compaction min/max thresholds: 4/64
>       Read repair chance: 0.01
>       Column Metadata:
>         Column Name: 09partition (09partition)
>           Validation Class: org.apache.cassandra.db.marshal.UTF8Type
>           Index Type: KEYS
>     ColumnFamily: Attractions
>       Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
>       Row cache size / save period: 30000.0/14400
>       Key cache size / save period: 30000.0/14400
>       Memtable thresholds: 0.3/64/60
>       GC grace seconds: 864000
>       Compaction min/max thresholds: 4/64
>       Read repair chance: 0.01
>       Column Metadata:
>         Column Name: 09partition (09partition)
>           Validation Class: org.apache.cassandra.db.marshal.UTF8Type
>           Index Type: KEYS
>     ColumnFamily: CityResources
>       Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
>       Row cache size / save period: 5000.0/14400
>       Key cache size / save period: 5000.0/14400
>       Memtable thresholds: 0.3/64/60
>       GC grace seconds: 864000
>       Compaction min/max thresholds: 4/64
>       Read repair chance: 0.01
>       Column Metadata:
>         Column Name: 09partition (09partition)
>           Validation Class: org.apache.cassandra.db.marshal.UTF8Type
>           Index Type: KEYS
>
>
> On Mon, Jul 18, 2011 at 8:20 AM, Boris Yen <yu...@gmail.com> wrote:
>
>> Will this have any side effect when doing a get_indexed_slices or when a
>> user wants to drop an index by any means?
>>
>> Boris
>>
>>
>> On Mon, Jul 18, 2011 at 1:13 PM, Jonathan Ellis <jb...@gmail.com>wrote:
>>
>>> 0.8.0 didn't check for name conflicts correctly.  0.8.1 does, but it
>>> can't fix the ones 0.8.0 allowed, retroactively.
>>>
>>> On Sun, Jul 17, 2011 at 11:52 PM, Boris Yen <yu...@gmail.com> wrote:
>>> > I have tested another case, not sure if this is a bug.
>>> > I created a few column families on 0.8.0 each has user_name column, in
>>> > addition, I also enabled secondary index on this column.  Then, I
>>> upgraded
>>> > to 0.8.1, when I used cassandra-cli: show keyspaces, I saw index name
>>> > "user_name_idx" appears for different columns families. It seems the
>>> > validation rule for index_name on 0.8.1 has been skipped completely.
>>> >
>>> > Is this a bug? or is it intentional?
>>> > Regards
>>> > Boris
>>> > On Sat, Jul 16, 2011 at 10:38 AM, Boris Yen <yu...@gmail.com>
>>> wrote:
>>> >>
>>> >> Done. It is CASSANDRA-2903.
>>> >> On Sat, Jul 16, 2011 at 9:44 AM, Jonathan Ellis <jb...@gmail.com>
>>> wrote:
>>> >>>
>>> >>> Please.
>>> >>>
>>> >>> On Fri, Jul 15, 2011 at 7:29 PM, Boris Yen <yu...@gmail.com>
>>> wrote:
>>> >>> > Hi Jonathan,
>>> >>> > Do I need to open a ticket for this?
>>> >>> > Regards
>>> >>> > Boris
>>> >>> >
>>> >>> > On Sat, Jul 16, 2011 at 6:29 AM, Jonathan Ellis <jbellis@gmail.com
>>> >
>>> >>> > wrote:
>>> >>> >>
>>> >>> >> Sounds reasonable to me.
>>> >>> >>
>>> >>> >> On Fri, Jul 15, 2011 at 2:55 AM, Boris Yen <yu...@gmail.com>
>>> wrote:
>>> >>> >> > Hi,
>>> >>> >> > I have a few column families, each has a column called
>>> user_name. I
>>> >>> >> > tried to
>>> >>> >> > use secondary index on user_name column for each of the column
>>> >>> >> > family.
>>> >>> >> > However, when creating these column families, cassandra keeps
>>> >>> >> > reporting
>>> >>> >> > "Duplicate index name..." exception. I finally figured out that
>>> it
>>> >>> >> > seems
>>> >>> >> > the
>>> >>> >> > default index name is "column name"+"_idx", this make my column
>>> >>> >> > family
>>> >>> >> > violate the "uniqueness of index name" rule.
>>> >>> >> > I was wondering if the default index_name generating rule could
>>> be
>>> >>> >> > like
>>> >>> >> > "column name"+"cf name", so the index name would not collide
>>> with
>>> >>> >> > each
>>> >>> >> > other
>>> >>> >> > that easily, if the user do not assign "index_name" when
>>> creating a
>>> >>> >> > column
>>> >>> >> > family.
>>> >>> >> > Regards
>>> >>> >> > Boris
>>> >>> >> >
>>> >>> >>
>>> >>> >>
>>> >>> >>
>>> >>> >> --
>>> >>> >> Jonathan Ellis
>>> >>> >> Project Chair, Apache Cassandra
>>> >>> >> co-founder of DataStax, the source for professional Cassandra
>>> support
>>> >>> >> http://www.datastax.com
>>> >>> >
>>> >>> >
>>> >>>
>>> >>>
>>> >>>
>>> >>> --
>>> >>> Jonathan Ellis
>>> >>> Project Chair, Apache Cassandra
>>> >>> co-founder of DataStax, the source for professional Cassandra support
>>> >>> http://www.datastax.com
>>> >>
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> Jonathan Ellis
>>> Project Chair, Apache Cassandra
>>> co-founder of DataStax, the source for professional Cassandra support
>>> http://www.datastax.com
>>>
>>
>>
>

Re: Default behavior of generate index_name for columns...

Posted by David Boxenhorn <da...@citypath.com>.
I have lots of indexes on columns with the same name. Why don't I have this
problem?

For example:

Keyspace: City:
  Replication Strategy: org.apache.cassandra.locator.SimpleStrategy
    Replication Factor: 3
  Column Families:
    ColumnFamily: AttractionCheckins
      Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
      Row cache size / save period: 0.0/0
      Key cache size / save period: 0.1/14400
      Memtable thresholds: 0.3/64/60
      GC grace seconds: 864000
      Compaction min/max thresholds: 4/64
      Read repair chance: 0.01
      Column Metadata:
        Column Name: 09partition (09partition)
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type
          Index Type: KEYS
    ColumnFamily: Attractions
      Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
      Row cache size / save period: 30000.0/14400
      Key cache size / save period: 30000.0/14400
      Memtable thresholds: 0.3/64/60
      GC grace seconds: 864000
      Compaction min/max thresholds: 4/64
      Read repair chance: 0.01
      Column Metadata:
        Column Name: 09partition (09partition)
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type
          Index Type: KEYS
    ColumnFamily: CityResources
      Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
      Row cache size / save period: 5000.0/14400
      Key cache size / save period: 5000.0/14400
      Memtable thresholds: 0.3/64/60
      GC grace seconds: 864000
      Compaction min/max thresholds: 4/64
      Read repair chance: 0.01
      Column Metadata:
        Column Name: 09partition (09partition)
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type
          Index Type: KEYS

On Mon, Jul 18, 2011 at 8:20 AM, Boris Yen <yu...@gmail.com> wrote:

> Will this have any side effect when doing a get_indexed_slices or when a
> user wants to drop an index by any means?
>
> Boris
>
>
> On Mon, Jul 18, 2011 at 1:13 PM, Jonathan Ellis <jb...@gmail.com> wrote:
>
>> 0.8.0 didn't check for name conflicts correctly.  0.8.1 does, but it
>> can't fix the ones 0.8.0 allowed, retroactively.
>>
>> On Sun, Jul 17, 2011 at 11:52 PM, Boris Yen <yu...@gmail.com> wrote:
>> > I have tested another case, not sure if this is a bug.
>> > I created a few column families on 0.8.0 each has user_name column, in
>> > addition, I also enabled secondary index on this column.  Then, I
>> upgraded
>> > to 0.8.1, when I used cassandra-cli: show keyspaces, I saw index name
>> > "user_name_idx" appears for different columns families. It seems the
>> > validation rule for index_name on 0.8.1 has been skipped completely.
>> >
>> > Is this a bug? or is it intentional?
>> > Regards
>> > Boris
>> > On Sat, Jul 16, 2011 at 10:38 AM, Boris Yen <yu...@gmail.com> wrote:
>> >>
>> >> Done. It is CASSANDRA-2903.
>> >> On Sat, Jul 16, 2011 at 9:44 AM, Jonathan Ellis <jb...@gmail.com>
>> wrote:
>> >>>
>> >>> Please.
>> >>>
>> >>> On Fri, Jul 15, 2011 at 7:29 PM, Boris Yen <yu...@gmail.com>
>> wrote:
>> >>> > Hi Jonathan,
>> >>> > Do I need to open a ticket for this?
>> >>> > Regards
>> >>> > Boris
>> >>> >
>> >>> > On Sat, Jul 16, 2011 at 6:29 AM, Jonathan Ellis <jb...@gmail.com>
>> >>> > wrote:
>> >>> >>
>> >>> >> Sounds reasonable to me.
>> >>> >>
>> >>> >> On Fri, Jul 15, 2011 at 2:55 AM, Boris Yen <yu...@gmail.com>
>> wrote:
>> >>> >> > Hi,
>> >>> >> > I have a few column families, each has a column called user_name.
>> I
>> >>> >> > tried to
>> >>> >> > use secondary index on user_name column for each of the column
>> >>> >> > family.
>> >>> >> > However, when creating these column families, cassandra keeps
>> >>> >> > reporting
>> >>> >> > "Duplicate index name..." exception. I finally figured out that
>> it
>> >>> >> > seems
>> >>> >> > the
>> >>> >> > default index name is "column name"+"_idx", this make my column
>> >>> >> > family
>> >>> >> > violate the "uniqueness of index name" rule.
>> >>> >> > I was wondering if the default index_name generating rule could
>> be
>> >>> >> > like
>> >>> >> > "column name"+"cf name", so the index name would not collide with
>> >>> >> > each
>> >>> >> > other
>> >>> >> > that easily, if the user do not assign "index_name" when creating
>> a
>> >>> >> > column
>> >>> >> > family.
>> >>> >> > Regards
>> >>> >> > Boris
>> >>> >> >
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >> --
>> >>> >> Jonathan Ellis
>> >>> >> Project Chair, Apache Cassandra
>> >>> >> co-founder of DataStax, the source for professional Cassandra
>> support
>> >>> >> http://www.datastax.com
>> >>> >
>> >>> >
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Jonathan Ellis
>> >>> Project Chair, Apache Cassandra
>> >>> co-founder of DataStax, the source for professional Cassandra support
>> >>> http://www.datastax.com
>> >>
>> >
>> >
>>
>>
>>
>> --
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of DataStax, the source for professional Cassandra support
>> http://www.datastax.com
>>
>
>

Re: Default behavior of generate index_name for columns...

Posted by Boris Yen <yu...@gmail.com>.
Will this have any side effect when doing a get_indexed_slices or when a
user wants to drop an index by any means?

Boris

On Mon, Jul 18, 2011 at 1:13 PM, Jonathan Ellis <jb...@gmail.com> wrote:

> 0.8.0 didn't check for name conflicts correctly.  0.8.1 does, but it
> can't fix the ones 0.8.0 allowed, retroactively.
>
> On Sun, Jul 17, 2011 at 11:52 PM, Boris Yen <yu...@gmail.com> wrote:
> > I have tested another case, not sure if this is a bug.
> > I created a few column families on 0.8.0 each has user_name column, in
> > addition, I also enabled secondary index on this column.  Then, I
> upgraded
> > to 0.8.1, when I used cassandra-cli: show keyspaces, I saw index name
> > "user_name_idx" appears for different columns families. It seems the
> > validation rule for index_name on 0.8.1 has been skipped completely.
> >
> > Is this a bug? or is it intentional?
> > Regards
> > Boris
> > On Sat, Jul 16, 2011 at 10:38 AM, Boris Yen <yu...@gmail.com> wrote:
> >>
> >> Done. It is CASSANDRA-2903.
> >> On Sat, Jul 16, 2011 at 9:44 AM, Jonathan Ellis <jb...@gmail.com>
> wrote:
> >>>
> >>> Please.
> >>>
> >>> On Fri, Jul 15, 2011 at 7:29 PM, Boris Yen <yu...@gmail.com> wrote:
> >>> > Hi Jonathan,
> >>> > Do I need to open a ticket for this?
> >>> > Regards
> >>> > Boris
> >>> >
> >>> > On Sat, Jul 16, 2011 at 6:29 AM, Jonathan Ellis <jb...@gmail.com>
> >>> > wrote:
> >>> >>
> >>> >> Sounds reasonable to me.
> >>> >>
> >>> >> On Fri, Jul 15, 2011 at 2:55 AM, Boris Yen <yu...@gmail.com>
> wrote:
> >>> >> > Hi,
> >>> >> > I have a few column families, each has a column called user_name.
> I
> >>> >> > tried to
> >>> >> > use secondary index on user_name column for each of the column
> >>> >> > family.
> >>> >> > However, when creating these column families, cassandra keeps
> >>> >> > reporting
> >>> >> > "Duplicate index name..." exception. I finally figured out that it
> >>> >> > seems
> >>> >> > the
> >>> >> > default index name is "column name"+"_idx", this make my column
> >>> >> > family
> >>> >> > violate the "uniqueness of index name" rule.
> >>> >> > I was wondering if the default index_name generating rule could be
> >>> >> > like
> >>> >> > "column name"+"cf name", so the index name would not collide with
> >>> >> > each
> >>> >> > other
> >>> >> > that easily, if the user do not assign "index_name" when creating
> a
> >>> >> > column
> >>> >> > family.
> >>> >> > Regards
> >>> >> > Boris
> >>> >> >
> >>> >>
> >>> >>
> >>> >>
> >>> >> --
> >>> >> Jonathan Ellis
> >>> >> Project Chair, Apache Cassandra
> >>> >> co-founder of DataStax, the source for professional Cassandra
> support
> >>> >> http://www.datastax.com
> >>> >
> >>> >
> >>>
> >>>
> >>>
> >>> --
> >>> Jonathan Ellis
> >>> Project Chair, Apache Cassandra
> >>> co-founder of DataStax, the source for professional Cassandra support
> >>> http://www.datastax.com
> >>
> >
> >
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com
>

Re: Default behavior of generate index_name for columns...

Posted by Jonathan Ellis <jb...@gmail.com>.
0.8.0 didn't check for name conflicts correctly.  0.8.1 does, but it
can't fix the ones 0.8.0 allowed, retroactively.

On Sun, Jul 17, 2011 at 11:52 PM, Boris Yen <yu...@gmail.com> wrote:
> I have tested another case, not sure if this is a bug.
> I created a few column families on 0.8.0 each has user_name column, in
> addition, I also enabled secondary index on this column.  Then, I upgraded
> to 0.8.1, when I used cassandra-cli: show keyspaces, I saw index name
> "user_name_idx" appears for different columns families. It seems the
> validation rule for index_name on 0.8.1 has been skipped completely.
>
> Is this a bug? or is it intentional?
> Regards
> Boris
> On Sat, Jul 16, 2011 at 10:38 AM, Boris Yen <yu...@gmail.com> wrote:
>>
>> Done. It is CASSANDRA-2903.
>> On Sat, Jul 16, 2011 at 9:44 AM, Jonathan Ellis <jb...@gmail.com> wrote:
>>>
>>> Please.
>>>
>>> On Fri, Jul 15, 2011 at 7:29 PM, Boris Yen <yu...@gmail.com> wrote:
>>> > Hi Jonathan,
>>> > Do I need to open a ticket for this?
>>> > Regards
>>> > Boris
>>> >
>>> > On Sat, Jul 16, 2011 at 6:29 AM, Jonathan Ellis <jb...@gmail.com>
>>> > wrote:
>>> >>
>>> >> Sounds reasonable to me.
>>> >>
>>> >> On Fri, Jul 15, 2011 at 2:55 AM, Boris Yen <yu...@gmail.com> wrote:
>>> >> > Hi,
>>> >> > I have a few column families, each has a column called user_name. I
>>> >> > tried to
>>> >> > use secondary index on user_name column for each of the column
>>> >> > family.
>>> >> > However, when creating these column families, cassandra keeps
>>> >> > reporting
>>> >> > "Duplicate index name..." exception. I finally figured out that it
>>> >> > seems
>>> >> > the
>>> >> > default index name is "column name"+"_idx", this make my column
>>> >> > family
>>> >> > violate the "uniqueness of index name" rule.
>>> >> > I was wondering if the default index_name generating rule could be
>>> >> > like
>>> >> > "column name"+"cf name", so the index name would not collide with
>>> >> > each
>>> >> > other
>>> >> > that easily, if the user do not assign "index_name" when creating a
>>> >> > column
>>> >> > family.
>>> >> > Regards
>>> >> > Boris
>>> >> >
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> Jonathan Ellis
>>> >> Project Chair, Apache Cassandra
>>> >> co-founder of DataStax, the source for professional Cassandra support
>>> >> http://www.datastax.com
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> Jonathan Ellis
>>> Project Chair, Apache Cassandra
>>> co-founder of DataStax, the source for professional Cassandra support
>>> http://www.datastax.com
>>
>
>



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

Re: Default behavior of generate index_name for columns...

Posted by Boris Yen <yu...@gmail.com>.
I have tested another case, not sure if this is a bug.

I created a few column families on 0.8.0 each has user_name column, in
addition, I also enabled secondary index on this column.  Then, I upgraded
to 0.8.1, when I used cassandra-cli: show keyspaces, I saw index name
"user_name_idx" appears for different columns families. It seems the
validation rule for index_name on 0.8.1 has been skipped completely.

Is this a bug? or is it intentional?

Regards
Boris

On Sat, Jul 16, 2011 at 10:38 AM, Boris Yen <yu...@gmail.com> wrote:

> Done. It is CASSANDRA-2903<https://issues.apache.org/jira/browse/CASSANDRA-2903>
> .
>
> On Sat, Jul 16, 2011 at 9:44 AM, Jonathan Ellis <jb...@gmail.com> wrote:
>
>> Please.
>>
>> On Fri, Jul 15, 2011 at 7:29 PM, Boris Yen <yu...@gmail.com> wrote:
>> > Hi Jonathan,
>> > Do I need to open a ticket for this?
>> > Regards
>> > Boris
>> >
>> > On Sat, Jul 16, 2011 at 6:29 AM, Jonathan Ellis <jb...@gmail.com>
>> wrote:
>> >>
>> >> Sounds reasonable to me.
>> >>
>> >> On Fri, Jul 15, 2011 at 2:55 AM, Boris Yen <yu...@gmail.com> wrote:
>> >> > Hi,
>> >> > I have a few column families, each has a column called user_name. I
>> >> > tried to
>> >> > use secondary index on user_name column for each of the column
>> family.
>> >> > However, when creating these column families, cassandra keeps
>> reporting
>> >> > "Duplicate index name..." exception. I finally figured out that it
>> seems
>> >> > the
>> >> > default index name is "column name"+"_idx", this make my column
>> family
>> >> > violate the "uniqueness of index name" rule.
>> >> > I was wondering if the default index_name generating rule could be
>> like
>> >> > "column name"+"cf name", so the index name would not collide with
>> each
>> >> > other
>> >> > that easily, if the user do not assign "index_name" when creating a
>> >> > column
>> >> > family.
>> >> > Regards
>> >> > Boris
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Jonathan Ellis
>> >> Project Chair, Apache Cassandra
>> >> co-founder of DataStax, the source for professional Cassandra support
>> >> http://www.datastax.com
>> >
>> >
>>
>>
>>
>> --
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of DataStax, the source for professional Cassandra support
>> http://www.datastax.com
>>
>
>

Re: Default behavior of generate index_name for columns...

Posted by Boris Yen <yu...@gmail.com>.
Done. It is CASSANDRA-2903<https://issues.apache.org/jira/browse/CASSANDRA-2903>
.

On Sat, Jul 16, 2011 at 9:44 AM, Jonathan Ellis <jb...@gmail.com> wrote:

> Please.
>
> On Fri, Jul 15, 2011 at 7:29 PM, Boris Yen <yu...@gmail.com> wrote:
> > Hi Jonathan,
> > Do I need to open a ticket for this?
> > Regards
> > Boris
> >
> > On Sat, Jul 16, 2011 at 6:29 AM, Jonathan Ellis <jb...@gmail.com>
> wrote:
> >>
> >> Sounds reasonable to me.
> >>
> >> On Fri, Jul 15, 2011 at 2:55 AM, Boris Yen <yu...@gmail.com> wrote:
> >> > Hi,
> >> > I have a few column families, each has a column called user_name. I
> >> > tried to
> >> > use secondary index on user_name column for each of the column family.
> >> > However, when creating these column families, cassandra keeps
> reporting
> >> > "Duplicate index name..." exception. I finally figured out that it
> seems
> >> > the
> >> > default index name is "column name"+"_idx", this make my column family
> >> > violate the "uniqueness of index name" rule.
> >> > I was wondering if the default index_name generating rule could be
> like
> >> > "column name"+"cf name", so the index name would not collide with each
> >> > other
> >> > that easily, if the user do not assign "index_name" when creating a
> >> > column
> >> > family.
> >> > Regards
> >> > Boris
> >> >
> >>
> >>
> >>
> >> --
> >> Jonathan Ellis
> >> Project Chair, Apache Cassandra
> >> co-founder of DataStax, the source for professional Cassandra support
> >> http://www.datastax.com
> >
> >
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com
>

Re: Default behavior of generate index_name for columns...

Posted by Jonathan Ellis <jb...@gmail.com>.
Please.

On Fri, Jul 15, 2011 at 7:29 PM, Boris Yen <yu...@gmail.com> wrote:
> Hi Jonathan,
> Do I need to open a ticket for this?
> Regards
> Boris
>
> On Sat, Jul 16, 2011 at 6:29 AM, Jonathan Ellis <jb...@gmail.com> wrote:
>>
>> Sounds reasonable to me.
>>
>> On Fri, Jul 15, 2011 at 2:55 AM, Boris Yen <yu...@gmail.com> wrote:
>> > Hi,
>> > I have a few column families, each has a column called user_name. I
>> > tried to
>> > use secondary index on user_name column for each of the column family.
>> > However, when creating these column families, cassandra keeps reporting
>> > "Duplicate index name..." exception. I finally figured out that it seems
>> > the
>> > default index name is "column name"+"_idx", this make my column family
>> > violate the "uniqueness of index name" rule.
>> > I was wondering if the default index_name generating rule could be like
>> > "column name"+"cf name", so the index name would not collide with each
>> > other
>> > that easily, if the user do not assign "index_name" when creating a
>> > column
>> > family.
>> > Regards
>> > Boris
>> >
>>
>>
>>
>> --
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of DataStax, the source for professional Cassandra support
>> http://www.datastax.com
>
>



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

Re: Default behavior of generate index_name for columns...

Posted by Boris Yen <yu...@gmail.com>.
Hi Jonathan,

Do I need to open a ticket for this?

Regards
Boris

On Sat, Jul 16, 2011 at 6:29 AM, Jonathan Ellis <jb...@gmail.com> wrote:

> Sounds reasonable to me.
>
> On Fri, Jul 15, 2011 at 2:55 AM, Boris Yen <yu...@gmail.com> wrote:
> > Hi,
> > I have a few column families, each has a column called user_name. I tried
> to
> > use secondary index on user_name column for each of the column family.
> > However, when creating these column families, cassandra keeps reporting
> > "Duplicate index name..." exception. I finally figured out that it seems
> the
> > default index name is "column name"+"_idx", this make my column family
> > violate the "uniqueness of index name" rule.
> > I was wondering if the default index_name generating rule could be like
> > "column name"+"cf name", so the index name would not collide with each
> other
> > that easily, if the user do not assign "index_name" when creating a
> column
> > family.
> > Regards
> > Boris
> >
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com
>

Re: Default behavior of generate index_name for columns...

Posted by Jonathan Ellis <jb...@gmail.com>.
Sounds reasonable to me.

On Fri, Jul 15, 2011 at 2:55 AM, Boris Yen <yu...@gmail.com> wrote:
> Hi,
> I have a few column families, each has a column called user_name. I tried to
> use secondary index on user_name column for each of the column family.
> However, when creating these column families, cassandra keeps reporting
> "Duplicate index name..." exception. I finally figured out that it seems the
> default index name is "column name"+"_idx", this make my column family
> violate the "uniqueness of index name" rule.
> I was wondering if the default index_name generating rule could be like
> "column name"+"cf name", so the index name would not collide with each other
> that easily, if the user do not assign "index_name" when creating a column
> family.
> Regards
> Boris
>



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