The flake history file: an append-only EDN-lines file in the state dir,
one CaseOutcome row per line (see hive-compose.schema).
An append writes every row of the call as one write under an exclusive
file lock (a second JVM sharing the file waits) and forces it to disk, so
a run is either all in the file or, when the process dies mid-write, ends
in one torn last line. A reader skips a line it cannot read and counts it
under :skipped in the meta of the rows; nothing is ever rewritten.
The flake history file: an append-only EDN-lines file in the state dir, one CaseOutcome row per line (see `hive-compose.schema`). An append writes every row of the call as one write under an exclusive file lock (a second JVM sharing the file waits) and forces it to disk, so a run is either all in the file or, when the process dies mid-write, ends in one torn last line. A reader skips a line it cannot read and counts it under `:skipped` in the meta of the rows; nothing is ever rewritten.
(append-rows! path rows)Append rows to the EDN-lines file at path, creating it and its
directory when absent. When the file does not end in a newline (a torn
last line), one is written first, so the torn line stays alone and the
new rows read. Result<{:appended n}>.
Append `rows` to the EDN-lines file at `path`, creating it and its
directory when absent. When the file does not end in a newline (a torn
last line), one is written first, so the torn line stays alone and the
new rows read. Result<{:appended n}>.(file-history path)An IFlakeHistory kept in the EDN-lines file at path.
An IFlakeHistory kept in the EDN-lines file at `path`.
(read-rows path)Result<[row]>: the rows of the EDN-lines file at path in append order, []
when it is absent. A blank line is ignored; a line that is no EDN map (a
torn last line) is skipped and counted under :skipped in the meta.
Result<[row]>: the rows of the EDN-lines file at `path` in append order, [] when it is absent. A blank line is ignored; a line that is no EDN map (a torn last line) is skipped and counted under `:skipped` in the meta.
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 |