Skip to content

v0.2.0

Choose a tag to compare

@hamicek hamicek released this 17 Aug 22:31
· 103 commits to main since this release
212711c

Event-log correctness and singleton fencing ergonomics, plus documentation honesty. All changes are additive and backward-compatible.

Event log

  • Append dedup (command-key) (#44): Append takes an optional dedup key sent as Nats-Msg-Id, so a redelivered command does not write a non-idempotent event twice. The handled message id is exposed as ctx.MsgID / ctx.msgId / ctx.msg_id. The stream's duplicate window is explicit and configurable via event_log_dedup_window_ms.
  • Retention fail-fast (#45): the lord warns at startup when event_log is 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_age when it would exceed it, so a short event_log_max_age_ms no longer fails stream creation and crashes aether 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. New examples/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