Repository navigation
v0.2.0
Event-log correctness and singleton fencing ergonomics, plus documentation honesty. All changes are additive and backward-compatible.
Event log
- Append dedup (command-key) (#44):
Appendtakes an optional dedup key sent asNats-Msg-Id, so a redelivered command does not write a non-idempotent event twice. The handled message id is exposed asctx.MsgID/ctx.msgId/ctx.msg_id. The stream's duplicate window is explicit and configurable viaevent_log_dedup_window_ms. - Retention fail-fast (#45): the lord warns at startup when
event_logis combined with a retention bound - a bounded log silently truncates a rebuild (there is no snapshot), which is safe for an audit-only log but wrong as a rebuild source. - Dedup window clamp (#46): the dedup window is clamped to
max_agewhen it would exceed it, so a shortevent_log_max_age_msno longer fails stream creation and crashesaether up.
Singleton fencing
- Docs honesty (#47): the docs now state the honest guarantee - singleton fencing bounds liveness overlap (at most one live instance, overlap ≤ lock TTL), it is not strict single-writer (a GC-paused old instance can still write; Kleppmann's fencing argument).
- Write-side fencing token (#48): the fencing epoch is exposed as
ctx.SingletonEpoch/ctx.singletonEpoch/ctx.singleton_epoch(0 for a non-singleton), so an application can enforce strict single-writer against a resource by sending the epoch with each write and rejecting a lower one. Newexamples/fencing-token/demonstrates the pattern in all three languages with an atomic KV compare-and-set guard.
Docs
- The README intro makes the OTP mapping explicit (lord = supervisor, thrall = GenServer / gen_statem / gen_event, ether = transport) (#49).
Full changelog: v0.1.0...v0.2.0