mike-tr-adamson commented on code in PR #2932:
URL: https://github.com/apache/cassandra/pull/2932#discussion_r1407578418


##########
src/java/org/apache/cassandra/index/sai/StorageAttachedIndex.java:
##########
@@ -390,10 +390,15 @@ public Callable<?> getPreJoinTask(boolean hadBootstrap)
     public Callable<?> getTruncateTask(long truncatedAt)
     {
         /*
-         * index files will be removed as part of base sstable lifecycle in
-         * {@link LogTransaction#delete(java.io.File)} asynchronously.
+         * index files will be removed as part of base sstable lifecycle in 
{@link LogTransaction#delete(java.io.File)}
+         * asynchronously, but we need to mark the index queryable because if 
the truncation is during the initial
+         * build of the index it won't get marked queryable by the build.
          */
-        return null;
+        return () -> {
+            logger.info(indexIdentifier.logMessage("Making index queryable 
during table truncation"));

Review Comment:
   It starts to get messy if we do that. There is a lot of code that depends on 
`BUILD_SUCCEEDED`. If we add a new status, we would need to handle that 
correctly. I'd prefer to leave this as is. As you say, truncation is a bad idea 
anyway. 



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to