Skip to content

v0.19.0

Choose a tag to compare

@jilio jilio released this 05 Sep 09:23
· 98 commits to main since this release
2e0ad7c

Hybrid replication policies

Replicator adds destination-acknowledged prefix barriers on top of Mirror's ordered copy loop. Ordinary writes can remain asynchronous; important writes call Position (or Capture for a group) and Wait to confirm the entire preceding source prefix. Confirmed exposes progress.

Positions and checkpoints include a relationship ID and log generation. Concurrent waits are independent, timeout does not stop replication or undo writes, restart resumes saved progress, and generation mismatches fail explicitly. Failed checkpoint saves cannot advance confirmation. Plain Mirror keeps its previous policy.

A successful wait inherits the destination's storage acknowledgement guarantees. Use a destination outside the source worker's failure domain, with acknowledgements backed by the required durability policy. This release does not provide writer fencing, snapshot transfer, or a guarantee that a destination projection has already applied the events.

Read the Confirmed Replication Guide for hybrid write examples, timeout/retry, generations, retention, deduplication and recovery rules.

Other changes

  • Durable Streams: opt-in WithStrictDecoding() returns malformed-envelope errors from Read/Tail instead of silently skipping records; use it for loss-sensitive replication sources.
  • Shutdown now stops admission, cancels active followers, drains accepted work before closing the store, and shares one close result across callers. New operations return ErrClosed; void publish helpers discard it. Timed-out shutdown continues draining in the background. See the shutdown contract.
  • Documentation, a runnable API example, and a process-loss smoke test: confirm 201 revisions, kill the source process, delete its files, and recover the prefix from the reopened SQLite replica.
  • Deterministic cancellation tests for live/durable Once rollback.

Validation and modules

Core and state retain 100% statement coverage. Workspace race tests/vet and standalone minimum-Go-version jobs pass. The process-loss smoke test runs in Linux CI. Core and SQLite still require Go 1.24.2; other module minimums are unchanged.

Versions: github.com/jilio/ebu, github.com/jilio/ebu/otel, github.com/jilio/ebu/stores/sqlite, and github.com/jilio/ebu/stores/durablestream are released as v0.19.0, with aligned ebu dependencies.

go get github.com/jilio/ebu@v0.19.0
# Optional stores/instrumentation:
go get github.com/jilio/ebu/stores/sqlite@v0.19.0
go get github.com/jilio/ebu/stores/durablestream@v0.19.0
go get github.com/jilio/ebu/otel@v0.19.0

Changes: #56 (shutdown), #57 (replication).