cassandra-pr mailing list archives

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

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



##########
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 @bereng. I understand that the original behaviour was:
   ```java
   return isInitialBuild ? LoadType.WRITE : LoadType.ALL;
   ```
   That's because the indexes were always writable independently of any kind of build failures,
there wasn't even a notion of writability. And, once they were queryable once, they were queryable
forever.
   
   Just took a quick look at the `SIMTest` failures, I think they are happening because `TestingIndex.shouldFailCreate`
is wrongly missed from `TestingIndex.clear()`. Once it's fixed to reset it, and we change
a couple of assertions about writability in `initializingIndexNotQueryableButWritableAfterPartialRebuild`,
all the tests seem to pass, at least locally.
   
   I'll take a closer look tomorrow.




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