Skip to content

dendro v0.2.0

Choose a tag to compare

@github-actions github-actions released this 18 Sep 18:19
· 49 commits to main since this release
3abd1fe

This is 0.2.0, not 0.1.1. The root re-exports below are removed public
items, which Cargo's SemVer reference calls a major change, and for a 0.x
crate the minor is the major position. 0.1.1-alpha.0 was the automated
post-release bump (chore: begin next development iteration) rather than a
decision, and shipping under it would break dendro = "0.1" callers on a
cargo update. The replication work on its own would have been a legitimate
0.1.1.

The crate version and the schema version answer different questions. The
archive schema version is unchanged at 4 -- nothing on disk moves, existing
archives are unaffected, and FORMAT.md section 8 governs that surface alone.
The Rust API broke separately. Neither implies the other.

Added

  • replicate::wire::LENGTH_PREFIX_BYTES, the offset at which a frame's payload
    begins. encode returns a whole frame and decode_payload takes the payload
    alone, because FrameReader has already consumed the prefix; a caller pairing
    the two by hand needed a bare 4.

  • Replication: frame types and a wire codec,
    Subscriber (apply frames to an archive) and ArchivePublisher (tail one).
    Transport is not included. One frame kind per table that rewrite carries, so
    the set has a completeness check rather than a guess; a live tail ships rows
    and the subscriber seals its own, while a catch-up ships sealed segments. An
    index entry stays opaque — the state hash a subscriber needs travels outside
    the blob. The wire format is specified in WIRE.md. It is not behind a
    feature — it adds no dependency and builds wherever the crate does, including
    wasm32. Subscriber alone needs write, because it drives the writer's
    thread; publishing is a read.

  • Writer::add_source_with_uuid, which carries an identity minted elsewhere so
    a copy is the source rather than another one with the same labels.

  • SourceWriter::adopt_segment, which inserts a segment built elsewhere at a
    stream's next seq. Refuses one that straddles the stream's watermark or
    reaches an unsealed row, and reports one the watermark already covers as
    already held rather than as a failure.

  • SourceWriter::clock_offset and ArchiveMut::insert_source_with_uuid, for
    carrying a clock-drift series and an identity that were observed elsewhere.

Removed

  • Breaking: the crate-root re-exports of Archive, ArchiveMut,
    Transaction, Writer and SourceWriter. Spell them by their module —
    dendro::archive::Archive, dendro::writer::Writer — which is what this
    crate's own tests, doc examples and intra-doc links already did; nothing
    inside dendro used the root path for any of them. Error, Result and
    ReadOnly stay at the root, which is what callers actually reach for.

    The rule is now statable: the error type and Result live at the crate root,
    every other type lives in its module. replicate already followed it and
    stops being an exception.

Changed

  • SegmentEncoder::version documents why it is a borrowed string: the value
    lands in sources.metadata, which the format defines as string to string, and
    dendro compares it for equality only. No signature change.