Versioned, generational manifest for the durable SSTable set.
CURRENT points to one MANIFEST-<generation> file. Every manifest is
independently recoverable: it starts with a fixed versioned header and one
complete snapshot record, followed by zero or more edit records. Records use
the same length + CRC frame as the WAL.
Rotation writes and fsyncs a new snapshot manifest, then atomically replaces
CURRENT. The existing manifest remains authoritative until that replacement,
so a crash on either side of the switch recovers a complete table set.
Versioned, generational manifest for the durable SSTable set. `CURRENT` points to one `MANIFEST-<generation>` file. Every manifest is independently recoverable: it starts with a fixed versioned header and one complete snapshot record, followed by zero or more edit records. Records use the same length + CRC frame as the WAL. Rotation writes and fsyncs a new snapshot manifest, then atomically replaces `CURRENT`. The existing manifest remains authoritative until that replacement, so a crash on either side of the switch recovers a complete table set.
Test hook called with each durable rotation step. Production leaves it nil.
Test hook called with each durable rotation step. Production leaves it nil.
(append-edit! manifest edit)Append and fsync one edit. The caller must hold (:lock manifest).
Append and fsync one edit. The caller must hold `(:lock manifest)`.
(close! manifest)Close the current manifest append stream.
Close the current manifest append stream.
(current-manifest-path config)Resolve the manifest named by CURRENT.
Resolve the manifest named by CURRENT.
(maybe-rotate! manifest tables)Rotate to a complete snapshot when the configured delta threshold is reached.
Failures before CURRENT replacement are non-fatal: the old manifest already contains the committed edit and remains active. A failure after replacement is fatal because continuing could append to a manifest other than CURRENT.
Rotate to a complete snapshot when the configured delta threshold is reached. Failures before CURRENT replacement are non-fatal: the old manifest already contains the committed edit and remains active. A failure after replacement is fatal because continuing could append to a manifest other than CURRENT.
(open-manifest config)Open the current manifest and return [manifest recovery].
recovery contains the base snapshot, following edits, and the persisted
sequence/table-id high-water marks. A torn final edit is removed before the
append stream is opened.
Open the current manifest and return `[manifest recovery]`. `recovery` contains the base snapshot, following edits, and the persisted sequence/table-id high-water marks. A torn final edit is removed before the append stream is opened.
(read-current-manifest config)Read the CURRENT manifest without opening it for append. Intended for diagnostics and tests.
Read the CURRENT manifest without opening it for append. Intended for diagnostics and tests.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |