From c51260c8c8fa0b72b2079f4f0eded82d4544b6dc Mon Sep 17 00:00:00 2001 From: Rob Leidle Date: Fri, 9 Aug 2024 09:26:28 -0700 Subject: [PATCH] Remove the PRAGMA setting of journal_mode which attempted to revert to the default journal_mode (#1976) The intention of the PRAGMA was to revert the databse back from WAL, however, this pragma is creating problems when multiple instances of continue are open Co-authored-by: Rob Leidle --- core/indexing/docs/DocsService.ts | 3 --- core/indexing/refreshIndex.ts | 3 --- 2 files changed, 6 deletions(-) diff --git a/core/indexing/docs/DocsService.ts b/core/indexing/docs/DocsService.ts index f5a6a62fb..1e8a8245c 100644 --- a/core/indexing/docs/DocsService.ts +++ b/core/indexing/docs/DocsService.ts @@ -476,9 +476,6 @@ export default class DocsService { await runSqliteMigrations(db); - // This next line, setting the journal_mode, can be removed once all databases are back to the default - // journal_mode and not using WAL. - await db.exec("PRAGMA journal_mode=DELETE;"); await db.exec(`CREATE TABLE IF NOT EXISTS ${DocsService.sqlitebTableName} ( id INTEGER PRIMARY KEY AUTOINCREMENT, title STRING NOT NULL, diff --git a/core/indexing/refreshIndex.ts b/core/indexing/refreshIndex.ts index 9fdae99f2..26ca80cb6 100644 --- a/core/indexing/refreshIndex.ts +++ b/core/indexing/refreshIndex.ts @@ -91,9 +91,6 @@ export class SqliteDb { driver: sqlite3.Database, }); - // This next line, setting the journal_mode, can be removed once all databases are back to the default - // journal_mode and not using WAL. - const result = await SqliteDb.db.exec("PRAGMA journal_mode=DELETE;"); await SqliteDb.createTables(SqliteDb.db); return SqliteDb.db;