[
https://issues.apache.org/jira/browse/CASSANDRA-10130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15989138#comment-15989138
]
Andrés de la Peña commented on CASSANDRA-10130:
-----------------------------------------------
The most straightforward solution would be to use the write path, as it is done
with materialized views and CDC.
As we want to avoid this, we could use [a new
table|https://github.com/adelapena/cassandra/blob/10130-trunk/src/java/org/apache/cassandra/db/SystemKeyspace.java#L147]
in the system keyspace to keep track of indexes that should be rebuilt before
start. So, we could mark the indexes to be rebuilt [right
before|https://github.com/adelapena/cassandra/blob/10130-trunk/src/java/org/apache/cassandra/streaming/StreamReceiveTask.java#L231]
adding the sstables to the column family and rebuilding the index. If
everything is ok, we
[unmark|https://github.com/adelapena/cassandra/blob/10130-trunk/src/java/org/apache/cassandra/streaming/StreamReceiveTask.java#L238]
the indexes for rebuilding. Otherwise, if the node dies, the next node start
would
[detect|https://github.com/adelapena/cassandra/blob/10130-trunk/src/java/org/apache/cassandra/index/internal/CassandraIndex.java#L173]
the indexes as marked for rebuilding and would throw a full index rebuild.
[Here|https://github.com/adelapena/cassandra/commit/cd5c3faab5d59cc75b98a8151f6245034c634e53]
is the draft of the approach.
> Node failure during 2i update after streaming can have incomplete 2i when
> restarted
> -----------------------------------------------------------------------------------
>
> Key: CASSANDRA-10130
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10130
> Project: Cassandra
> Issue Type: Bug
> Components: Coordination
> Reporter: Yuki Morishita
> Assignee: Andrés de la Peña
> Priority: Minor
>
> Since MV/2i update happens after SSTables are received, node failure during
> MV/2i update can leave received SSTables live when restarted while MV/2i are
> partially up to date.
> We can add some kind of tracking mechanism to automatically rebuild at the
> startup, or at least warn user when the node restarts.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]