Code cleanup
This commit is contained in:
parent
bff4d87164
commit
fe31f9b1c7
@ -484,10 +484,11 @@ public class DatabaseMapDictionary<T, U> extends DatabaseMapDictionaryDeep<T, U,
|
||||
if (keyMin == null && keyMax == null) {
|
||||
return getAllStages(snapshot, smallRange);
|
||||
} else {
|
||||
Mono<LLRange> boundedRangeMono = Mono.usingWhen(rangeMono,
|
||||
range -> Mono.fromCallable(() -> getPatchedRange(range, keyMin, keyMax)),
|
||||
range -> Mono.fromRunnable(range::close)
|
||||
);
|
||||
Mono<LLRange> boundedRangeMono = rangeMono.map(range -> {
|
||||
try (range) {
|
||||
return getPatchedRange(range, keyMin, keyMax);
|
||||
}
|
||||
});
|
||||
return getAllStages(snapshot, boundedRangeMono, reverse, smallRange);
|
||||
}
|
||||
}
|
||||
|
@ -128,6 +128,7 @@ public final class OptimisticRocksDBColumn extends AbstractRocksDBColumn<Optimis
|
||||
prevDataToSendToUpdater = null;
|
||||
}
|
||||
try {
|
||||
assert newData == null || !newData.isAccessible();
|
||||
newData = updater.apply(prevDataToSendToUpdater);
|
||||
} finally {
|
||||
if (prevDataToSendToUpdater != null && prevDataToSendToUpdater.isAccessible()) {
|
||||
|
Loading…
Reference in New Issue
Block a user