Don't close unreleasable buffers

This commit is contained in:
Andrea Cavalli 2021-10-29 00:11:25 +02:00
parent 37de47fd6c
commit f3c63842c8
3 changed files with 9 additions and 3 deletions

View File

@ -34,8 +34,10 @@ public abstract class LLLocalGroupedReactiveRocksIterator<T> extends
}
try {
if (obj.readOptions != null) {
if (!(obj.readOptions instanceof UnreleasableReadOptions)) {
obj.readOptions.close();
}
}
} catch (Throwable ex) {
logger.error("Failed to close readOptions", ex);
}

View File

@ -35,8 +35,10 @@ public class LLLocalKeyPrefixReactiveRocksIterator extends
}
try {
if (obj.readOptions != null) {
if (!(obj.readOptions instanceof UnreleasableReadOptions)) {
obj.readOptions.close();
}
}
} catch (Throwable ex) {
logger.error("Failed to close readOptions", ex);
}

View File

@ -33,8 +33,10 @@ public abstract class LLLocalReactiveRocksIterator<T> extends
}
try {
if (obj.readOptions != null) {
if (!(obj.readOptions instanceof UnreleasableReadOptions)) {
obj.readOptions.close();
}
}
} catch (Throwable ex) {
logger.error("Failed to close readOptions", ex);
}