Code cleanup

This commit is contained in:
Andrea Cavalli 2022-05-02 19:05:40 +02:00
parent 19bb638f20
commit 614d24ac8d

View File

@ -1003,15 +1003,13 @@ public class LLLocalKeyValueDatabase implements LLKeyValueDatabase {
@Override
public Mono<LLLocalDictionary> getDictionary(byte[] columnName, UpdateMode updateMode) {
return Mono
.fromCallable(() -> {
return Mono.fromCallable(() -> {
var closeReadLock = closeLock.readLock();
try {
ensureOpen();
var cfh = getCfh(columnName);
ensureOwned(cfh);
return new LLLocalDictionary(
allocator,
return new LLLocalDictionary(allocator,
getRocksDBColumn(db, cfh),
name,
ColumnUtils.toString(columnName),
@ -1024,8 +1022,7 @@ public class LLLocalKeyValueDatabase implements LLKeyValueDatabase {
} finally {
closeLock.unlockRead(closeReadLock);
}
})
.subscribeOn(dbRScheduler);
}).subscribeOn(dbRScheduler);
}
public RocksDBColumn getRocksDBColumn(byte[] columnName) {