MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / setWalAutocheckpoint

Method setWalAutocheckpoint

src/db/index.ts:501–503  ·  view source on GitHub ↗

* Set the connection's `wal_autocheckpoint` interval (pages; 0 disables). * Bulk indexing defers checkpoints entirely (#1231): the default 1000-page * auto-checkpoint re-writes hot B-tree/FTS pages into the main DB file over * and over — measured at ~95% of ALL disk I/O during a bulk index,

(pages: number)

Source from the content-addressed store, hash-verified

499 * deferral a {@link WalCheckpointValve} bounds WAL growth off-thread.
500 */
501 setWalAutocheckpoint(pages: number): void {
502 this.db.pragma(`wal_autocheckpoint = ${Math.max(0, Math.floor(pages))}`);
503 }
504
505 /**
506 * `PRAGMA wal_checkpoint(PASSIVE)` on a worker thread with its own

Callers 3

indexAllMethod · 0.80
syncMethod · 0.80

Calls 1

pragmaMethod · 0.65

Tested by

no test coverage detected