[ 
https://issues.apache.org/jira/browse/CASSANDRA-10130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16052165#comment-16052165
 ] 

Paulo Motta commented on CASSANDRA-10130:
-----------------------------------------

bq. I think we should preserve the original behaviour; it is not perfect, but 
CASSANDRA-13606 should provide a proper fix.

I really think it makes the code cleaner and less prone to errors to update 
{{SecondaryIndexManager}} state ({{needsFullRebuild}}, {{queryableIndexes}} and 
{{inProgressBuilds}}) exclusively in the {{mark*}} methods rather than in many 
places throughout the code.

The SASI test failures was due to the fact that the 
{{invalidateAllIndexesBlocking}} name was misleading, since this was actually 
dropping all indexes, so I renamed it to {{dropAllIndexes}} and extracted the 
invalidate part into another method which can be used by the SASI tests.

Here is the [commit with these 
changes|https://github.com/pauloricardomg/cassandra/commit/ad8beb0bb4bf40d0e5cc4aee3c1bf02ace3f6929].

In the same spirit, I also removed the marking of index as failed before 
fetching the initialization task [on this 
commit|https://github.com/pauloricardomg/cassandra/commit/33f56de12f3573f42e0426cd915fb049405c883d].

Regarding the exception being passed as the last parameter to the logger, 
that's not a bug since sl4j [will properly handle that 
case|https://www.slf4j.org/faq.html#paramException], so I added [this 
commit|https://github.com/pauloricardomg/cassandra/commit/b5771f010191b06198880b5c2bb1dfc0c46b3b1c]
 reinstating this behavior.

[~sbtourist] let me know what do you think before [~adelapena] updates the 
branch with these suggestions.

Thanks!

> 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.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to