pub struct EncodedChunk {
pub frame: Bytes,
pub rows: u32,
pub acks: AckSet,
pub oldest_ingest: Instant,
pub oldest_event_ms: i64,
}Expand description
A small frame of encoded rows produced on a pipeline thread, the unit shipped over the per-shard queues. Wire frames are concatenable — either the format is headerless (RowBinary rows appended back-to-back) or each frame is one complete, self-describing block (ClickHouse Native), and a concatenation of complete blocks is itself a legal insert stream — so workers accumulate chunks without re-encoding.
Teardown safety: acks is an AckSet — dropping a chunk anywhere
(a closed queue, an aborted worker, a parked chunk at teardown) fails
its batches so their offsets never commit; only a completed durable
write delivers them.
Fields§
§frame: BytesEncoded rows in the sink’s wire format.
rows: u32Number of rows in frame.
acks: AckSetAcknowledgement handles of the source batches represented in
frame. Consecutive records usually share a batch, so this stays
short (the encoder dedupes consecutive identical handles).
oldest_ingest: InstantWhen the oldest record in frame entered the terminal stage
(ingest-basis end-to-end latency).
oldest_event_ms: i64Smallest record event time in frame, milliseconds since the epoch
(event-basis end-to-end latency).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for EncodedChunk
impl RefUnwindSafe for EncodedChunk
impl Send for EncodedChunk
impl Sync for EncodedChunk
impl Unpin for EncodedChunk
impl UnsafeUnpin for EncodedChunk
impl UnwindSafe for EncodedChunk
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more