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


##########
src/java/org/apache/cassandra/db/SSTableImporter.java:
##########
@@ -186,6 +186,8 @@ synchronized List<String> importNewSSTables(Options options)
         try (Refs<SSTableReader> refs = Refs.ref(newSSTables))
         {
             abortIfDraining();
+
+            cfs.indexManager.buildIndexesBlockingIncremental(newSSTables);

Review Comment:
   This is the crux of the change. When we have SSTable-attached indexes, they 
should always be build here, before we add the new SSTables to the tracker. 
That way we a.) fail the import before the SSTables become readable if there's 
an index building failure and b.) we have the index view update almost 
immediately after the base table view (which isn't perfect, as there could 
still be a very small window of inconsistency, but it's a huge improvement).
   
   TODO: This probably would benefit from a comment to this effect.



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