maedhroz commented on code in PR #3575:
URL: https://github.com/apache/cassandra/pull/3575#discussion_r1801563861
##########
src/java/org/apache/cassandra/index/sai/plan/QueryController.java:
##########
@@ -168,6 +167,22 @@ public UnfilteredRowIterator queryStorage(PrimaryKey key,
ReadExecutionControlle
return partition.queryMemtableAndDisk(cfs, executionController);
}
+ private static Runnable getIndexReleaser(Set<SSTableIndex>
referencedIndexes)
+ {
+ return new Runnable()
+ {
+ boolean closed;
+ @Override
+ public void run()
+ {
+ if (closed)
+ return;
+ closed = true;
+ referencedIndexes.forEach(SSTableIndex::releaseQuietly);
+ }
+ };
+ }
Review Comment:
I see. So we're just trying to make sure that can't happen in the future. In
that case, we might want to consider just enforcing single closure in
`KeyRangeIterator#close()`. Might be slightly less invasive...up to you.
--
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]