cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [cassandra] adelapena commented on a change in pull request #570: CASSANDRA-13606 Improve handling of 2i initialization failures
Date Fri, 15 May 2020 16:47:22 GMT

adelapena 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:
       I'm not sure this is inline with the `LoadType.NOOP` behaviour of the indexes. Indeed,
it leaves `LoadType#supportsReads()` without usages. I think that, to preserve the behaviour
of the default indexes, we should make a distinction between failures in the initial build
task and failures in rebuilds. As I mention on the dtest review, the current behaviour would
    * Returns the type of operations supported by the index in case its building has failed
and it's needing recovery.
    * @param isInitialBuild {@code true} if the failure is for the initial build task on index
creation, {@code false}
    * if the failure is for a rebuild or recovery.
   default LoadType getSupportedLoadTypeOnFailure(boolean isInitialBuild)
       return isInitialBuild ? LoadType.WRITE : LoadType.ALL;

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