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:
us...@infra.apache.org



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

Reply via email to