From e11e0930209e330649af182eaa0317d2d987d4e8 Mon Sep 17 00:00:00 2001 From: AsamK Date: Tue, 14 Jan 2025 22:35:45 +0100 Subject: [PATCH] Enable sqlite WAL journal_mode Related #1670 --- .../main/java/org/asamk/signal/manager/storage/Database.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/main/java/org/asamk/signal/manager/storage/Database.java b/lib/src/main/java/org/asamk/signal/manager/storage/Database.java index 938bb010e..5099662ef 100644 --- a/lib/src/main/java/org/asamk/signal/manager/storage/Database.java +++ b/lib/src/main/java/org/asamk/signal/manager/storage/Database.java @@ -95,7 +95,7 @@ private static HikariDataSource getHikariDataSource(final String databaseFile) { sqliteConfig.setTransactionMode(SQLiteConfig.TransactionMode.IMMEDIATE); HikariConfig config = new HikariConfig(); - config.setJdbcUrl("jdbc:sqlite:" + databaseFile + "?foreign_keys=ON"); + config.setJdbcUrl("jdbc:sqlite:" + databaseFile + "?foreign_keys=ON&journal_mode=wal"); config.setDataSourceProperties(sqliteConfig.toProperties()); config.setMinimumIdle(1); return new HikariDataSource(config);