Repository navigation
dendro v0.2.0
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.encodereturns a whole frame anddecode_payloadtakes the payload
alone, becauseFrameReaderhas already consumed the prefix; a caller pairing
the two by hand needed a bare4. -
Replication: frame types and a wire codec,
Subscriber(apply frames to an archive) andArchivePublisher(tail one).
Transport is not included. One frame kind per table thatrewritecarries, 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 inWIRE.md. It is not behind a
feature — it adds no dependency and builds wherever the crate does, including
wasm32.Subscriberalone needswrite, 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 nextseq. 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_offsetandArchiveMut::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,WriterandSourceWriter. 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,Resultand
ReadOnlystay at the root, which is what callers actually reach for.The rule is now statable: the error type and
Resultlive at the crate root,
every other type lives in its module.replicatealready followed it and
stops being an exception.
Changed
SegmentEncoder::versiondocuments why it is a borrowed string: the value
lands insources.metadata, which the format defines as string to string, and
dendro compares it for equality only. No signature change.