Enable manual flush

This commit is contained in:
Andrea Cavalli 2023-07-25 17:29:36 +02:00
parent e83270906e
commit fdb504d9cd
1 changed files with 6 additions and 2 deletions

View File

@ -904,6 +904,10 @@ public class LLLocalKeyValueDatabase extends Backuppable implements LLKeyValueDa
options.setSkipStatsUpdateOnDbOpen(true);
options.setCreateMissingColumnFamilies(true);
options.setInfoLogLevel(InfoLogLevel.WARN_LEVEL);
// todo: automatically flush every x seconds?
options.setManualWalFlush(true);
options.setAvoidFlushDuringShutdown(false); // Flush all WALs during shutdown
options.setAvoidFlushDuringRecovery(true); // Flush all WALs during startup
options.setWalRecoveryMode(databaseOptions.absoluteConsistency()
@ -987,9 +991,9 @@ public class LLLocalKeyValueDatabase extends Backuppable implements LLKeyValueDa
.setBytesPerSync(64 * SizeUnit.MB)
.setWalBytesPerSync(64 * SizeUnit.MB)
.setWalTtlSeconds(60) // Auto
.setWalTtlSeconds(80) // Auto
.setWalSizeLimitMB(0) // Auto
.setMaxTotalWalSize(10 * SizeUnit.GB)
.setMaxTotalWalSize(0) // AUto
;
blockCache = CACHE_FACTORY.newCache(writeBufferManagerSize + databaseOptions.blockCache().orElse( 512 * SizeUnit.MB));
refs.track(blockCache);