Document that DATA_DIR must be on a local filesystem (closes #295) #514

Merged
clawbot merged 1 commits from issue-295-datadir-local-filesystem into next 2026-10-13 01:29:44 +02:00
Collaborator

Adds one paragraph to the README's "What to back up" section, after the -wal/-shm sidecar paragraphs, for #295.

It says DATA_DIR must be on a local filesystem, because SQLite in WAL mode maps each database's -shm file into memory and network filesystems (NFS, SMB/CIFS) do not support that reliably. It also says that disk I/O error (522) (SQLITE_IOERR_SHORT_READ) points at the storage under DATA_DIR, not at locking, and that moving DATA_DIR to a plain local disk is the first thing to try.

Checked against the code: every connection sets journal_mode(WAL) in internal/database/sqlite_open.go and nothing sets locking_mode, so the -shm file is in use. The driver turns on extended result codes and formats this error as disk I/O error (522). Nothing in webhooker checks which filesystem DATA_DIR is on, and the paragraph says so rather than implying startup would refuse one.

Judgement call: the paragraph sits next to the sidecar explanation it depends on, not under "Running with Docker", whose default is a local volume.

Left alone: the "Single-instance lock" sentence saying flock(2) does not arbitrate between hosts on a network filesystem. It is still true.

ZFS is not named: the one failure seen on it was never reproduced.

Model: opus-5-5

Adds one paragraph to the README's "What to back up" section, after the `-wal`/`-shm` sidecar paragraphs, for https://git.eeqj.de/sneak/webhooker/issues/295. It says `DATA_DIR` must be on a local filesystem, because SQLite in WAL mode maps each database's `-shm` file into memory and network filesystems (NFS, SMB/CIFS) do not support that reliably. It also says that `disk I/O error (522)` (`SQLITE_IOERR_SHORT_READ`) points at the storage under `DATA_DIR`, not at locking, and that moving `DATA_DIR` to a plain local disk is the first thing to try. Checked against the code: every connection sets `journal_mode(WAL)` in `internal/database/sqlite_open.go` and nothing sets `locking_mode`, so the `-shm` file is in use. The driver turns on extended result codes and formats this error as `disk I/O error (522)`. Nothing in webhooker checks which filesystem `DATA_DIR` is on, and the paragraph says so rather than implying startup would refuse one. Judgement call: the paragraph sits next to the sidecar explanation it depends on, not under "Running with Docker", whose default is a local volume. Left alone: the "Single-instance lock" sentence saying `flock(2)` does not arbitrate between hosts on a network filesystem. It is still true. ZFS is not named: the one failure seen on it was never reproduced. Model: opus-5-5
clawbot added the needs-review label 2026-10-13 00:56:43 +02:00
clawbot self-assigned this 2026-10-13 00:56:43 +02:00
clawbot added 1 commit 2026-10-13 00:56:44 +02:00
SQLite in WAL mode maps each database's -shm file into memory, and
network filesystems do not support that reliably, so the README now
says DATA_DIR must be local and names NFS and SMB/CIFS as unsupported.
It also says what a disk I/O error with code 522 points at and what to
try first. ZFS is not called unsupported: the one failure seen there
was never reproduced.

Model: opus-5-5
Author
Collaborator

Review passed.

Model: opus-5-5

Review passed. Model: opus-5-5
clawbot merged commit 9199544999 into next 2026-10-13 01:29:44 +02:00
clawbot deleted branch issue-295-datadir-local-filesystem 2026-10-13 01:29:45 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/webhooker#514