cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrés de la Peña (JIRA) <>
Subject [jira] [Commented] (CASSANDRA-10130) Node failure during 2i update after streaming can have incomplete 2i when restarted
Date Thu, 15 Jun 2017 16:18:00 GMT


Andrés de la Peña commented on CASSANDRA-10130:

Here is another version of the patch:


bq. I mistakenly removed {{queryableIndexes]] in my refactor (as noted); [this|]
commit added it back, but it's unfortunately not enough, as if the initialization task fails,
the index will never be made queryable: we need to fix this, and we need a test for such failure

a successful full rebuild adds the index to the set of queryable indexes. I have also added
[some tests|]
to check the behaviour. Note that a partial build doesn't set the index as queryable.

bq. Nit/OCD: I would change the [rebuildFromSSTablesBlocking|]
signature to have the {{sstables}} first, consistently with {{buildIndexesBlocking}}.

Initially done [here|],
but see three quotes below.

bq. In {{buildIndexesBlocking}}, any exceptions thrown by {{flushIndexesBlocking}} in the
{{finally}} block will hide previous exceptions: we should accumulate them.

Done [here|].

bq. Nit/OCD: In buildIndexesBlocking, we should put an additional comment before invoking

Done [here|].

bq. If {{rebuildFromSSTablesBlocking}} is not used elsewhere, I would strongly recommend to
make it private/protected and move its comment to {{rebuildIndexesBlocking}}: the [general
is methods (as well as attributes) should have the most restricted visibility allowed by working

Actually {{rebuildFromSSTablesBlocking}} is only called by full rebuilds, so we can eve get
rid of this method and move its content and doc to {{rebuildIndexesBlocking}}, as it is done
Tests still have access to partial builds through [{{handleNotification}}|].

bq. Regarding the {{test_standalone_scrub failure}}, I believe it's due to the fact we only
manage counters in our marking methods when {{DatabaseDescriptor.isDaemonInitialized()}},
which is obviously not the case with the scrubber; if so, it's probably an easy fix.

Right, it's fixed [here|].

Apart form this, [here|]
I have restored {{CassandraIndexTest#indexCorrectlyMarkedAsBuildAndRemoved}} to its initial
shape because all the added cases are (better) covered by {{SecondaryIndexManagerTest}}. The
reason to preserve the test is that it uses a real index implementation instead of a mocked
one, which can be useful although the difficulties to simulate failures, blocking, etc.

I have also removed some unused imports.

> Node failure during 2i update after streaming can have incomplete 2i when restarted
> -----------------------------------------------------------------------------------
>                 Key: CASSANDRA-10130
>                 URL:
>             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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message