[ 
https://issues.apache.org/jira/browse/CASSANDRA-9196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sam Tunnicliffe updated CASSANDRA-9196:
---------------------------------------
    Attachment: 2.1-CASSANDRA-9196.txt

The patch looks good for 2.0, but it won't work for 2.1/trunk. The reason being 
that {{indexes()}} now takes a {{CellName}} rather than a {{ByteBuffer}} 
containing the column name and we can't construct one in {{maybeRebuildIndex}}. 
I've attached an alternative patch for 2.1+ that adds that an 
{{indexes(ColumnDefinition)}} overload, with the default implementation on 
{{SecondaryIndex}} simply checking if the supplied {{ColumnDefinition}} is 
present in the index's {{columnDefs}}. 

> Do not rebuild indexes if no columns are actually indexed
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-9196
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9196
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Sergio Bossa
>            Assignee: Sergio Bossa
>             Fix For: 2.0.15
>
>         Attachments: 2.0-CASSANDRA-9196.txt, 2.1-CASSANDRA-9196.txt
>
>
> When rebuilding secondary indexes, the index task is executed regardless if 
> the actual {{SecondaryIndex#indexes(ByteBuffer )}} implementation of any 
> index returns true for any column, meaning that the expensive task of going 
> through all sstables and related rows will be executed even if in the end no 
> column/row will be actually indexed.
> This is a huge performance hit when i.e. bootstrapping with large datasets on 
> tables having custom secondary index implementations whose {{indexes()}} 
> implementation might return false.



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

Reply via email to