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

View File

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

View File

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