Update db engine

This commit is contained in:
Andrea Cavalli 2021-06-20 01:07:21 +02:00
parent 9bd95234d4
commit fa347a2c17
2 changed files with 8 additions and 2 deletions

View File

@ -114,7 +114,7 @@
<dependency> <dependency>
<groupId>it.cavallium</groupId> <groupId>it.cavallium</groupId>
<artifactId>dbengine</artifactId> <artifactId>dbengine</artifactId>
<version>3.0.169</version> <version>3.0.172</version>
</dependency> </dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>

View File

@ -36,6 +36,7 @@ import it.unimi.dsi.fastutil.booleans.BooleanArrayList;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Optional; import java.util.Optional;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import org.warp.filesponge.DiskMetadata.DiskMetadataSerializer; import org.warp.filesponge.DiskMetadata.DiskMetadataSerializer;
@ -62,7 +63,12 @@ public class DiskCache implements URLsDiskHandler, URLsWriter {
public static Mono<DiskCache> open(LLDatabaseConnection databaseConnection, String dbName, boolean lowMemory) { public static Mono<DiskCache> open(LLDatabaseConnection databaseConnection, String dbName, boolean lowMemory) {
return databaseConnection return databaseConnection
.getDatabase(dbName, List.of(Column.dictionary("file-content"), Column.dictionary("file-metadata")), lowMemory, false) .getDatabase(dbName,
List.of(Column.dictionary("file-content"), Column.dictionary("file-metadata")),
Map.of("enableColumnBug", "true"),
lowMemory,
false
)
.flatMap(db -> Mono.zip( .flatMap(db -> Mono.zip(
Mono.just(db).single(), Mono.just(db).single(),
db.getDictionary("file-content", UpdateMode.ALLOW).single(), db.getDictionary("file-content", UpdateMode.ALLOW).single(),