[
https://issues.apache.org/jira/browse/CASSANDRA-13725?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sergio Bossa updated CASSANDRA-13725:
-------------------------------------
This is caused by calling {{SIM#markIndexesBuilding}} when creating the index
during column family initialization, which marks the index as "not built" and
causes the index initialization task to rebuild it.
Given there's no need to mark the index when a new column family is created (as
the index will be "not built" by definition and there can't be any concurrent
indexing), we can just pass a boolean up to {{createIndex()}} to distinguish
between index creation at different times, i.e. when a column family is
[created|https://github.com/sbtourist/cassandra/blob/CASSANDRA-13725/src/java/org/apache/cassandra/db/Keyspace.java#L394]
or
[reloaded|https://github.com/sbtourist/cassandra/blob/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java#L129].
Such solution is implemented in the following patch, with a new dtest verifying
it:
|[trunk|https://github.com/apache/cassandra/pull/135]|[dtest|https://github.com/apache/cassandra-dtest/pull/2]|
Test runs are in progress on our internal CI and I will report results as soon
as they're ready.
> Secondary indexes are always rebuilt at startup
> -----------------------------------------------
>
> Key: CASSANDRA-13725
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13725
> Project: Cassandra
> Issue Type: Bug
> Components: Secondary Indexes
> Reporter: Sergio Bossa
> Assignee: Sergio Bossa
> Priority: Critical
> Fix For: 4.0
>
>
> Following CASSANDRA-10130, a bug has been introduced that causes a 2i to be
> rebuilt at startup, even if such index is already built.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]