ekaterinadimitrova2 commented on code in PR #3955:
URL: https://github.com/apache/cassandra/pull/3955#discussion_r1994106907
##########
src/java/org/apache/cassandra/index/SecondaryIndexManager.java:
##########
@@ -316,7 +317,13 @@ public void checkQueryability(Index.QueryPlan queryPlan)
for (Index index : queryPlan.getIndexes())
{
if (!isIndexQueryable(index))
+ {
+ // In Astra index can be queryable during index build, thus we
need to check both not queryable and building
Review Comment:
So something like that? (with non-destroyed by GH formatting, of course)
```
public void checkQueryability(Index.QueryPlan queryPlan)
{
InetAddressAndPort endpoint =
FBUtilities.getBroadcastAddressAndPort();
for (Index index : queryPlan.getIndexes())
{
String indexName = index.getIndexMetadata().name;
Index.Status indexStatus = getIndexStatus(endpoint,
keyspace.getName(), indexName);
if (!isIndexQueryable(index))
{
// Plus isQueryable is always true for non-SAI index
implementations, thus we need to check both not queryable and building
if (indexStatus == Index.Status.FULL_REBUILD_STARTED)
throw new IndexBuildInProgressException(index);
throw new IndexNotAvailableException(index);
}
}
}
```
--
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]