cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse McConnell (JIRA)" <>
Subject [jira] Commented: (CASSANDRA-1566) indexType required for secondary indices and fails silently with out it
Date Fri, 01 Oct 2010 14:42:34 GMT


Jesse McConnell commented on CASSANDRA-1566:

is it not wrong to have a user expecting to be creating a secondary index, have put everything
in place to make that happen and have cassandra silently _not_ do the intended behavior, to
have an optional parameter deceptively named index_type that really governs if a secondary
index gets made or not?

based on the logic being implemented here info.thrift_type would be better renamed to be a
boolean 'info.make_index' and have it be optionally defined as true if you actually want an

> indexType required for secondary indices and fails silently with out it
> -----------------------------------------------------------------------
>                 Key: CASSANDRA-1566
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 0.7 beta 2
>            Reporter: Jesse McConnell
>            Priority: Minor
> When defining an secondary index on a column family the indexType is required to be set
to KEYS and if you don't set that cassandra will silently fail to add the index
>         for (ColumnDefinition info : metadata.column_metadata.values())
>         {
>             if (info.index_type != null)
>                 addIndex(info);
>         }
> You are able to make it to this code in the ColumnFamilyStore with no warnings (that
I noticed at least) and there ought to at least be an info message here where it indicates
the index is being tossed during creation. 
> Better yet there ought to be protection on the thrift call that requires this option
for the request to be valid or default it to the only option right now of KEYS 
> cheers

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message