davidradl commented on code in PR #28251:
URL: https://github.com/apache/flink/pull/28251#discussion_r3303797564
##########
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/state/rocksdb/sstmerge/Compactor.java:
##########
@@ -51,7 +52,10 @@ public Compactor(CompactionTarget target, long
targetOutputFileSize) {
}
void compact(ColumnFamilyHandle cfName, int level, List<String> files)
throws RocksDBException {
- int outputLevel = Math.min(level + 1,
cfName.getDescriptor().getOptions().numLevels() - 1);
+ final int outputLevel;
+ try (ColumnFamilyOptions cfOptions =
cfName.getDescriptor().getOptions()) {
Review Comment:
I suggest adding comments like you had in the Jira - so this code is not
inadvertently simplified.. I assume the try with resources closes the resources
that were causing the leak.
--
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]