cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [cassandra] bereng commented on a change in pull request #570: CASSANDRA-13606 Improve handling of 2i initialization failures
Date Mon, 18 May 2020 16:12:25 GMT

bereng commented on a change in pull request #570:
URL: https://github.com/apache/cassandra/pull/570#discussion_r426740935



##########
File path: src/java/org/apache/cassandra/index/SecondaryIndexManager.java
##########
@@ -655,6 +695,9 @@ private synchronized void markIndexFailed(Index index)
                 SystemKeyspace.setIndexRemoved(baseCfs.keyspace.getName(), indexName);
 
             needsFullRebuild.add(indexName);
+
+            if (!index.getSupportedLoadTypeOnFailure().supportsWrites() && writableIndexes.remove(indexName)
!= null)
+                logger.info("Index [" + indexName + "] became not-writable.");

Review comment:
       Hi @adelapena, regarding `return isInitialBuild ? LoadType.WRITE : LoadType.ALL;`
   
   `isInitialBuild` is a new variable we'd have to create and track in SIM. And then `Index`
would have to render which load is supported depending on 'when' the failure happened?. Sounds
weird to me and like we are mixing concerns. It's easier for my brain to pick the idea of
having the supported load state in the `Index`, SIM to track that instead of trying to infer
it, set the defaults we'd like and be done. But that's for another discussion as you rightfully
point.
   
   I did try that change in SIM and this sends `SIMTest` into the most amazing failure scenarios
with indexes blocking when they shouldn't, jstaks on all threads blocked and all kind of funnies.
I did spend some time on it without success until I realized it should be:
   
   `return isInitialBuild ? LoadType.WRITE : LoadType.READ;`
   
   Correct?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Mime
View raw message