cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
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:

File path: src/java/org/apache/cassandra/index/
@@ -655,6 +695,9 @@ private synchronized void markIndexFailed(Index index)
                 SystemKeyspace.setIndexRemoved(baseCfs.keyspace.getName(), indexName);
+            if (!index.getSupportedLoadTypeOnFailure().supportsWrites() && writableIndexes.remove(indexName)
!= null)
+      "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
   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;`

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:

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

View raw message