blambov commented on code in PR #2064:
URL: https://github.com/apache/cassandra/pull/2064#discussion_r1081323501
##########
src/java/org/apache/cassandra/db/compaction/CompactionManager.java:
##########
@@ -1890,22 +1890,17 @@ public void run()
return executor.submitIfRunning(runnable, "cache write");
}
- public List<SSTableReader>
runIndexSummaryRedistribution(IndexSummaryRedistribution redistribution) throws
IOException
+ public <T, E extends Throwable> T runWithActiveCompactions(Holder holder,
ThrowingSupplier<T, E> callable) throws E
Review Comment:
looks good
##########
src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java:
##########
@@ -1033,6 +1012,14 @@ protected void closeInternalComponent(AutoCloseable
closeable)
}
}
+ /**
+ * This method is expected to close the components which occupy memory but
are not needed when we just want to
+ * stream the components (for example, when SSTable is opened with
SSTableLoader). The method should call
+ * {@link #closeInternalComponent(AutoCloseable)} for each such component.
Leaving the implementation empty is
+ * valid, but may impact memory usage.
+ */
+ public abstract void releaseComponents();
Review Comment:
looks good
--
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]