You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
Frame::SourceUpdate (wire kind 6, WIRE.md §4.6): a source's labels and
metadata after its handshake, both maps whole, and ts, the publisher's
wall time when it saw the change. Subscriber replaces its copy's labels
and metadata with them, except the copy's encoder and writer_sessions
where it has them; any other key the publisher removed is removed. It
counts them in Applied::source_updates. A FrameReader on dendro 0.3.0
or later that does not know the kind skips it (WIRE.md §7); wire::decode_payload before this release refuses it.
SourceWriter::set_identity and ArchiveMut::set_source_identity, which
replace a source's labels and metadata in one transaction, keeping the
source's encoder and writer_sessions where it has them, since they
describe the file's own encoder and writer sessions; every other key, events included, is replaced. Transaction::set_source_identity writes
both maps as given.
Changed
ArchivePublisher::next reads the archive's sources on every poll. It sends
a SourceUpdate for a source whose labels or metadata changed since they
were last sent, ahead of that source's other frames, and a Handshake,
with the next ordinal, for a source created after the publisher opened,
followed by what the opening catch-up would ship for it: segments and clock
offsets from catching_up's since (all of them for tailing), index
entries and live rows. Before this the publisher read the sources once,
when it opened, so a subscriber kept the identity it saw at connect and
never received a source added later. A caller of next that assumed a
fixed set of sources now sees handshakes after the first batch.
Fixed
ArchivePublisher::next ships as Segment frames the sealed rows of a
stream that had no rows when a tailing publisher opened, no segments
when a catching_up one opened, or that did not exist then, and that was
sealed before a poll shipped any of its rows. Such a stream lost those
rows without an error: it had no cursor to compare the seal's watermark
with, and the live tail held only the rows after the seal. Every stream of
a source created after the publisher opened and handshaken while empty was
exposed to this.