✳simplemagic / data
Developers/Pulse
On this page

Durability and recovery

Pulse uses a write-ahead log and immutable Parquet files. The contract below describes standalone operation; replicated acknowledgment semantics are different.

What HTTP 204 means

Before acknowledging a standalone batch, the node validates it, appends it to the WAL, fsyncs it, and applies it. A successful write is not merely buffered in process memory.

Local fsync does not protect against losing the disk or storage hardware that dishonestly acknowledges persistence. Replication and backups solve different failure modes.

How recovery works

A manifest identifies the committed Parquet files and covered WAL position. Checkpoints publish flushed files before deleting the covered WAL prefix. Restart validates storage and replays uncovered history before readiness becomes true.

Missing committed files or complete checksum corruption fail startup. Only incomplete terminal records in the active WAL segment are truncated. Do not manually delete a manifest or corrupt file to force recovery.

Clean shutdown

SIGINT or SIGTERM closes admission, drains accepted writes, cancels and joins reads, and synchronizes storage. Individual filesystem work can delay shutdown. A client may lose its response during draining even if its write becomes durable.

For evaluation, stop the foreground process with Ctrl-C, restart with the same config, wait for /readyz, and query known rows.

Unknown writes

A deadline, lost connection, or unknown outcome can leave a fully applied batch without an acknowledgment. Inspect application identity and the intended record before deciding whether to resubmit.

Policy Retry consequence
Append A repeated request can add duplicate logical rows
Dedup A repeated key replaces the whole row; an old retry can overwrite a newer correction

Neither policy is request-ID deduplication. Keep explicit timestamps and correction ordering in the application.

Upgrade and recovery planning

On-disk formats have changed across development milestones. Preserve a verified recovery copy before upgrades and use the format compatibility notes in the matched checkout. Older binaries can refuse upgraded manifests. Do not assume a rolling cluster upgrade or downgrade is supported.

A file copy taken during writes is not documented here as a consistent backup. The current sharded backup workflow is separate from this standalone guide. Verify restoration with the exact release and operating mode before relying on it.

Search documentation

Type to search across both databases.

↑ ↓ to navigate · Enter to openEsc to close