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

Sergio Bossa commented on CASSANDRA-10130:
------------------------------------------

bq. 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.

I know that would be cleaner, but bear in mind that's also a change from 
previous behaviour *and* would cause the index to be considered queryable even 
if the initialization task failed and later a non-full rebuild succeeded. I'm 
not a fan of that, but I'll leave it to you guys.

bq. I also removed the marking of index as failed before fetching the 
initialization task on this commit.

Looks good, and also properly marks the index failed (which we forgot to do 
before).

bq. Regarding the exception being passed as the last parameter to the logger, 
that's not a bug since sl4j will properly handle that case

Apologies, I misread the diff.

I'd like to finally highlight two further changes from previous behaviour that 
just crossed my mind (unrelated to Paulo's patches):
1) If the index initialization fails because of a non build error, and the 
index was previously built, it will be rebuilt again from scratch anyway.
2) If a single sstable build fails, the index will be (potentially) fully 
rebuilt at restart; while theoretically correct, this could have a non-trivial 
performance impact at startup.

That said, #1 is probably better addressed by CASSANDRA-13606, while #2 is what 
worries me most; I personally do not think that automatically rebuilding the 
indexes at startup gives much advantages, as it's an async operation anyway, so 
I'd propose to either/both add a {{cassandra.yaml}} option to enable automatic 
rebuilds explicitly or/and add a flag to NodeTool to rebuild indexes _only if_ 
not already built.

Thoughts?

> 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