Expand description
Decoded execution store, shared within one process and between processes (issue #243).
Decoding executions.lino costs about 1-4 ms per record, and one
--status used to decode it up to three times (get, then get_all
twice for the execution chain). The file is still read on every call, so a
write by any process is seen at once, but it is decoded again only when its
content differs from the last decoded copy. The content itself is the key:
unlike an mtime, it cannot miss two same-size writes within one clock tick.
A new process (every $ --status poll) still had to decode once. The
decoded records are therefore also kept as JSON next to the store, tagged
with the SHA-256 of the content they were decoded from; parsing that copy
is far faster than the lino decode. A copy whose digest does not match the
current content is ignored and replaced.
Enums§
- Decode
Source - Where the records of a read came from.
Constants§
- DECODED_
COPY_ FORMAT - Format tag of the JSON copy; a different tag is ignored.
Functions§
- decode_
count - How many times this process decoded the store at
pathsince it was last forgotten. - decode_
store_ content - Decode
contentof the store atpathinto JSON records, or reuse an earlier decode of the same content: this process’s own, or the JSON copy atcopy_path. Every call returns its own copy, so callers may change the records they get. - forget_
decoded_ store - Drop the decoded copy of a store held by this process; all stores when
pathisNone.