Skip to content

Commit

Permalink
Remove the PRAGMA setting of journal_mode which attempted to revert t…
Browse files Browse the repository at this point in the history
…o the default journal_mode (continuedev#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 <[email protected]>
  • Loading branch information
spew and Rob Leidle authored Aug 9, 2024
1 parent 1e3e8eb commit c51260c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions core/indexing/docs/DocsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 0 additions & 3 deletions core/indexing/refreshIndex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c51260c

Please sign in to comment.