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


##########
src/java/org/apache/cassandra/index/sai/view/IndexViewManager.java:
##########
@@ -186,6 +179,13 @@ private Pair<Collection<SSTableIndex>, 
Collection<SSTableContext>> getBuiltIndex
                 }
 
                 SSTableIndex ssTableIndex = 
sstableContext.newSSTableIndex(index);
+                if (ssTableIndex == null)
+                {
+                    logger.debug(index.identifier().logMessage("No on-disk 
index was built for SSTable {} because the SSTable " +
+                                                               "had no 
indexable rows for the index."), sstableContext.descriptor());
+                    continue;
+                }

Review Comment:
   So by moving this here, we're now at least attempting to validate even when 
we know the index is empty, and we're implicitly using the `null` return value 
to identify the non-vector case. I don't *think* this will blow up validation 
above, as it detects empty indexes too...but I wonder if there's a way to cut 
down on the duplication...



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