Skip to content

Commit 71c8f69

Browse files
docs(shared): describe checkpointWorker with a writer worker
AI-assisted; verified with the tests and tools listed above. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 0ff2a9e commit 71c8f69

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/server/src/persistence/Sqlite.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const layerFromPath = Effect.fn("makeSqlitePersistenceLive")(function* (d
5656
readerWorker: true,
5757
// Run writes off the event loop so slow statements and transactions cannot stall clients.
5858
writerWorker: true,
59-
// Keeps checkpoint fsyncs off the event loop if the writer has to fall back to the main thread.
59+
// Bounds WAL growth while readers pin snapshots, in the writer worker or on a main-thread fallback.
6060
checkpointWorker: true,
6161
spanAttributes: {
6262
"db.name": path.basename(dbPath),

‎packages/shared/src/nodeSqliteClient.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export interface SqliteClientConfig {
3737
readonly readerWorker?: boolean | undefined;
3838
/** Ignored for in-memory databases. Falls back to the main thread when the worker cannot start. */
3939
readonly writerWorker?: boolean | undefined;
40-
/** Ignored for in-memory databases and when the writer runs in a worker, which checkpoints off the event loop itself. */
40+
/** Ignored for in-memory databases. Bounds WAL growth; a writer worker enforces it in the worker itself. */
4141
readonly checkpointWorker?: boolean | undefined;
4242
}
4343

0 commit comments

Comments
 (0)