[
https://issues.apache.org/jira/browse/CASSANDRA-9314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sergio Bossa updated CASSANDRA-9314:
------------------------------------
Description:
In order to avoid rebuilding indexes when no columns are actually indexed
(originally implemented in CASSANDRA-9196), CASSANDRA-9281 hinted at overriding
{{SecondaryIndex#getColumnDefs}} to "filter out" indexes that shouldn't be
rebuilt; unfortunately, I believe this would be quite wrong for safety reasons,
as it could have side effects on other methods relying on {{getColumnDefs}}
returning a stable set, and API consistency ones, as it would be confusing to
have {{getColumnDefs}} behave differently based on runtime conditions, possibly
ignoring {{addColumnDef}} calls.
I believe {{SecondaryIndex#indexes}} is still the best candidate to act as a
filter predicate, and I propose to overload it to accept a column definition
for all those cases (i.e. index rebuilding) missing a full cell name.
was:
In order to avoid rebuilding indexes when no columns are actually indexed
(originally implemented in CASSANDRA-9196), CASSANDRA-9281 hinted at overriding
{{SecondaryIndex#getColumnDefs}} to "filter out" indexes that shouldn't be
rebuilt; unfortunately, I believe this would be quite wrong for safety reasons,
as it could have side effects on other methods relying on {{getColumnDefs}}
returning a stable set, and API consistency ones, as it would be confusing to
have {{getColumnDefs}} behave differently based on runtime conditions, possibly
ignoring {{addColumnDef}} calls.
I believe {{SecondaryIndex#indexes}} is still the best candidate to act as a
filter predicate, and I propose to overload it to accept a column definition
name for all those cases (i.e. index rebuilding) missing a full cell name.
> Overload SecondaryIndex#indexes to accept the column definition
> ---------------------------------------------------------------
>
> Key: CASSANDRA-9314
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9314
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Sergio Bossa
> Assignee: Sergio Bossa
> Attachments: 2.0-CASSANDRA-9314.txt
>
>
> In order to avoid rebuilding indexes when no columns are actually indexed
> (originally implemented in CASSANDRA-9196), CASSANDRA-9281 hinted at
> overriding {{SecondaryIndex#getColumnDefs}} to "filter out" indexes that
> shouldn't be rebuilt; unfortunately, I believe this would be quite wrong for
> safety reasons, as it could have side effects on other methods relying on
> {{getColumnDefs}} returning a stable set, and API consistency ones, as it
> would be confusing to have {{getColumnDefs}} behave differently based on
> runtime conditions, possibly ignoring {{addColumnDef}} calls.
> I believe {{SecondaryIndex#indexes}} is still the best candidate to act as a
> filter predicate, and I propose to overload it to accept a column definition
> for all those cases (i.e. index rebuilding) missing a full cell name.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)