Skip to content

Commit 5e57b9f

Browse files
committed
set journal mode to wal when creating db.
Trying to work around sqlite3.OperationalError: disk I/O error errors in CI that I can't reproduce locally. Also this allows reads to happen while writes are occurring. This should permit using the web interface for browsing while a large write load (e.g. bulk data loading from another tracker) is happening. Right now autogenerating issues locks up the tracker for reading with an error that the database is locked.
1 parent f287374 commit 5e57b9f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

roundup/backends/back_sqlite.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ def open_connection(self):
203203
self.sql('create index ids_name_idx on ids(name)')
204204
self.create_version_2_tables()
205205
self._add_fts5_table()
206+
# Set journal mode to WAL.
207+
self.conn.execute('pragma journal_mode=wal')
206208

207209
def create_version_2_tables(self):
208210
self.sql('create table otks (otk_key varchar, '

0 commit comments

Comments
 (0)