Skip to main content

Module vec

Module vec 

Source
Expand description

A worked Chunk: Vec<((K, V), T, R)> behind an Rc.

The reference implementation. It shows the two integration points any Chunk satisfies; another layout copies this shape, not the Vec:

  • Batcher side. The chunker builds chunks through timely’s container traits (Accountable, SizableContainer, Consolidate, PushInto), which here delegate to the inner Vec via Rc::make_mut (free while building, never copying a shared batch).
  • Trace side. Chunk plus a cursor: key lookups gallop (logarithmic in chunk size), stepping is linear.

Clone is a refcount bump, so the trace merger shares source chunks rather than copying them.

Structs§

VecChunk
A sorted, consolidated run of ((key, val), time, diff), shared via Rc.
VecChunkCursor
A cursor over a VecChunk, tracking the current key and (key, val) group starts as indices into the flat vector.

Type Aliases§

ChunkBatcher
Merge batcher over VecChunks; a ContainerChunker<VecChunk> at the arrange_core callsite forms the chunks it merges (via the container traits below).
ChunkBuilder
Batch builder.
ChunkSpine
The trace type for arrange: a spine of Rc-shared chunk batches.