From 0062a36ed5b74a82d5a2ba6fde9ca9c2862d366b Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Tue, 23 May 2023 00:20:14 +0200 Subject: [PATCH] Change defaults --- .../dbengine/database/disk/LLLocalKeyValueDatabase.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyValueDatabase.java b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyValueDatabase.java index fe293ff..e1e1e36 100644 --- a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyValueDatabase.java +++ b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalKeyValueDatabase.java @@ -99,11 +99,12 @@ import org.rocksdb.util.SizeUnit; public class LLLocalKeyValueDatabase extends Backuppable implements LLKeyValueDatabase { private static final boolean DELETE_LOG_FILES = false; - private static final boolean FOLLOW_ROCKSDB_OPTIMIZATIONS = false; + private static final boolean FOLLOW_ROCKSDB_OPTIMIZATIONS = true; private static final boolean USE_CLOCK_CACHE = Boolean.parseBoolean(System.getProperty("it.cavallium.dbengine.clockcache.enable", "false")); private static final CacheFactory CACHE_FACTORY = USE_CLOCK_CACHE ? new ClockCacheFactory() : new LRUCacheFactory(); + private static final boolean ALLOW_SNAPSHOTS = Boolean.parseBoolean(System.getProperty("it.cavallium.dbengine.snapshots.allow", "true")); static { RocksDB.loadLibrary(); @@ -305,7 +306,7 @@ public class LLLocalKeyValueDatabase extends Backuppable implements LLKeyValueDa if (columnOptions.writeBufferSize().isPresent()) { columnFamilyOptions.setWriteBufferSize(columnOptions.writeBufferSize().get()); } - columnFamilyOptions.setMaxWriteBufferNumberToMaintain(2); + columnFamilyOptions.setMaxWriteBufferNumberToMaintain(1); if (tableOptions instanceof BlockBasedTableConfig blockBasedTableConfig) { blockBasedTableConfig.setVerifyCompression(false); }