# HG changeset patch # User Alain Mazy # Date 1659433111 -7200 # Node ID e6f26be401fa732fbd324aef7024a51a67a8d64f # Parent 191e86305f199f662dc1900c27d7b67b06947ea4 SQLite: close and delete WAL and SHM files on exit (contribution from Sebastian Höffner) diff -r 191e86305f19 -r e6f26be401fa NEWS --- a/NEWS Thu Jul 14 18:53:24 2022 +0200 +++ b/NEWS Tue Aug 02 11:38:31 2022 +0200 @@ -10,7 +10,8 @@ ----------- * DelayedDeletion plugin: Fix leaking of symbols - +* SQLite now closes and deletes WAL and SHM files on exit. This should improve + handling of SQLite DB over network drives. Version 1.11.1 (2022-06-30) =========================== diff -r 191e86305f19 -r e6f26be401fa OrthancServer/Sources/Database/SQLiteDatabaseWrapper.cpp --- a/OrthancServer/Sources/Database/SQLiteDatabaseWrapper.cpp Thu Jul 14 18:53:24 2022 +0200 +++ b/OrthancServer/Sources/Database/SQLiteDatabaseWrapper.cpp Tue Aug 02 11:38:31 2022 +0200 @@ -1371,6 +1371,8 @@ void SQLiteDatabaseWrapper::Close() { boost::mutex::scoped_lock lock(mutex_); + // close and delete the WAL when exiting properly -> the DB is stored in a single file (no more -wal and -shm files) + db_.Execute("PRAGMA JOURNAL_MODE=DELETE;"); db_.Close(); }