Durable directory-backed Storage adapter. Layout:
<root>/segments/<url-encoded-id> content files <root>/log/<zero-padded-t>.dat one file per log entry
Appends write to a temp file, fsync, atomically rename, then fsync the parent directory — durability before ack, surviving both process kill and machine crash. A fresh adapter over the same directory sees every acked entry, so crash recovery is: open, rebuild, continue.
Segment ids round-trip through URL-encoding of (str id); note that filesystems with case-insensitive names (e.g. macOS APFS defaults) will conflate ids differing only by case.
Durable directory-backed Storage adapter. Layout: <root>/segments/<url-encoded-id> content files <root>/log/<zero-padded-t>.dat one file per log entry Appends write to a temp file, fsync, atomically rename, then fsync the parent directory — durability before ack, surviving both process kill and machine crash. A fresh adapter over the same directory sees every acked entry, so crash recovery is: open, rebuild, continue. Segment ids round-trip through URL-encoding of (str id); note that filesystems with case-insensitive names (e.g. macOS APFS defaults) will conflate ids differing only by case.
(open-storage path)Open (or create) the storage rooted at path. Over an existing directory every acked segment and log entry is preserved. The append-time monotonicity check compares against the last t held from open — under the single-writer topology that is always the freshest acked entry; the adapter does not re-derive it from the directory per commit.
Open (or create) the storage rooted at path. Over an existing directory every acked segment and log entry is preserved. The append-time monotonicity check compares against the last t held from open — under the single-writer topology that is always the freshest acked entry; the adapter does not re-derive it from the directory per commit.
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 |