ekaterinadimitrova2 commented on code in PR #3194:
URL: https://github.com/apache/cassandra/pull/3194#discussion_r1543823998


##########
src/java/org/apache/cassandra/index/sai/plan/QueryController.java:
##########
@@ -257,9 +257,11 @@ public KeyRangeIterator.Builder 
getIndexQueryResults(Collection<Expression> expr
         }
         catch (Throwable t)
         {
+            int rangeCount = builder.rangeCount();
             // all sstable indexes in view have been referenced, need to clean 
up when exception is thrown
             builder.cleanup();
-            queryView.referencedIndexes.forEach(SSTableIndex::releaseQuietly);
+            if (rangeCount == 0)
+                
queryView.referencedIndexes.forEach(SSTableIndex::releaseQuietly);

Review Comment:
   Added



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