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

Method checkpointWalTruncate

src/db/index.ts:538–540  ·  view source on GitHub ↗

* `PRAGMA wal_checkpoint(TRUNCATE)` — same off-thread pattern as PASSIVE, * but on success the WAL FILE is chopped to zero. A completed passive * backfill bounds the un-checkpointed backlog, yet the FILE only stops * growing when a commit finds ZERO readers holding WAL marks — rare while

()

Source from the content-addressed store, hash-verified

536 * degrades this to a no-op (busy=1) instead of a stall.
537 */
538 async checkpointWalTruncate(): Promise<{ busy: number; log: number; checkpointed: number } | null> {
539 return this.checkpointWal('TRUNCATE');
540 }
541
542 /**
543 * Shrink a leftover oversized WAL (#1431). A SIGKILL'd session — the #850

Callers 3

runWalHealMethod · 0.95
backfillFullyMethod · 0.80

Calls 1

checkpointWalMethod · 0.95

Tested by

no test coverage detected