maedhroz commented on code in PR #2492:
URL: https://github.com/apache/cassandra/pull/2492#discussion_r1266048504


##########
src/java/org/apache/cassandra/index/sai/StorageAttachedIndexGroup.java:
##########
@@ -249,9 +249,9 @@ public void handleNotification(INotification notification, 
Object sender)
         {
             SSTableAddedNotification notice = (SSTableAddedNotification) 
notification;
 
-            // Avoid validation for index files just written following 
Memtable flush.
-            IndexValidation validate = notice.memtable().isPresent() ? 
IndexValidation.NONE : IndexValidation.CHECKSUM;
-            onSSTableChanged(Collections.emptySet(), notice.added, indexes, 
validate);
+            // Avoid validation for index files just written following 
Memtable flush. Otherwise, the new SSTables have
+            // come either from import, streaming, or a standalone tool, where 
they have also already been validated.
+            onSSTableChanged(Collections.emptySet(), notice.added, indexes, 
IndexValidation.NONE);

Review Comment:
   With this change, I think we can no longer get into the trouble we might 
find ourselves in w/ 
https://github.com/apache/cassandra/pull/2460#discussion_r1253762041, and the 
comment explains why we're not validating at all.
   
   The question is whether I now need to simplify the downstream code. Given 
we're not validating, some of the downstream codepaths might not be used, 
although checksumming still happens via `shouldWritePerSSTableFiles()`. Once we 
get here, index components should have been built and such, so the only thing 
we're doing is updating the views and potentially marking the index 
non-queryable, which I think is okay. (i.e. Marking the index non-queryable is 
the only thing that we can really do, but what I need to confirm is whether 
we're being strict enough around that.)
   
   Thoughts?



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