From 4d46a32bb40ac931833815bf672f6db6b27945d7 Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Thu, 26 Sep 2024 17:16:00 +0200 Subject: [PATCH] Fix volume path nullability, update gestalt, fix sst options --- pom.xml | 2 +- .../it/cavallium/rockserver/core/impl/DataSizeDecoder.java | 2 +- .../rockserver/core/impl/DbCompressionDecoder.java | 2 +- .../java/it/cavallium/rockserver/core/impl/EmbeddedDB.java | 2 +- .../rockserver/core/impl/rocksdb/RocksDBLoader.java | 6 ++++-- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index ed785d2..7206c6b 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ 22 22 0.9.28 - 0.25.3 + 0.32.1 9.0.0 2.0.12 rockserver-core diff --git a/src/main/java/it/cavallium/rockserver/core/impl/DataSizeDecoder.java b/src/main/java/it/cavallium/rockserver/core/impl/DataSizeDecoder.java index da796ee..9f1dc2c 100644 --- a/src/main/java/it/cavallium/rockserver/core/impl/DataSizeDecoder.java +++ b/src/main/java/it/cavallium/rockserver/core/impl/DataSizeDecoder.java @@ -40,7 +40,7 @@ public class DataSizeDecoder implements Decoder { return GResultOf.errors(new ValidationError.DecodingNumberFormatException(path, node, name(), - decoderContext.getSecretConcealer() + decoderContext )); } } diff --git a/src/main/java/it/cavallium/rockserver/core/impl/DbCompressionDecoder.java b/src/main/java/it/cavallium/rockserver/core/impl/DbCompressionDecoder.java index 6cd5702..ab1f841 100644 --- a/src/main/java/it/cavallium/rockserver/core/impl/DbCompressionDecoder.java +++ b/src/main/java/it/cavallium/rockserver/core/impl/DbCompressionDecoder.java @@ -41,7 +41,7 @@ public class DbCompressionDecoder implements Decoder { return GResultOf.errors(new ValidationError.DecodingNumberFormatException(path, node, name(), - decoderContext.getSecretConcealer() + decoderContext )); } } diff --git a/src/main/java/it/cavallium/rockserver/core/impl/EmbeddedDB.java b/src/main/java/it/cavallium/rockserver/core/impl/EmbeddedDB.java index 87cf27b..16a9f04 100644 --- a/src/main/java/it/cavallium/rockserver/core/impl/EmbeddedDB.java +++ b/src/main/java/it/cavallium/rockserver/core/impl/EmbeddedDB.java @@ -462,7 +462,7 @@ public class EmbeddedDB implements RocksDBSyncAPI, Closeable { yield wb; } case SST_INGESTION, SST_INGEST_BEHIND -> { - var sstWriter = getSSTWriter(columnId, null, null, true, mode == PutBatchMode.SST_INGEST_BEHIND); + var sstWriter = getSSTWriter(columnId, null, null, false, mode == PutBatchMode.SST_INGEST_BEHIND); refs.add(sstWriter); yield sstWriter; } diff --git a/src/main/java/it/cavallium/rockserver/core/impl/rocksdb/RocksDBLoader.java b/src/main/java/it/cavallium/rockserver/core/impl/rocksdb/RocksDBLoader.java index 4eb8521..6e114b0 100644 --- a/src/main/java/it/cavallium/rockserver/core/impl/rocksdb/RocksDBLoader.java +++ b/src/main/java/it/cavallium/rockserver/core/impl/rocksdb/RocksDBLoader.java @@ -488,8 +488,10 @@ public class RocksDBLoader { .stream() .map(volumeConfig -> { try { - return new DbPathRecord(definitiveDbPath.resolve(volumeConfig.volumePath()), volumeConfig.targetSize().longValue()); - } catch (GestaltException e) { + var volumePath = volumeConfig.volumePath(); + Objects.requireNonNull(volumePath, "volumePath is null"); + return new DbPathRecord(definitiveDbPath.resolve(volumePath), volumeConfig.targetSize().longValue()); + } catch (NullPointerException | GestaltException e) { throw it.cavallium.rockserver.core.common.RocksDBException.of(RocksDBErrorType.CONFIG_ERROR, "Failed to load volume configurations", e); } })