Skip to main content

Module chunk

Module chunk 

Source
Expand description

LZ4-compressed sort chunk files for spilling to disk.

During Phase 1 (read + process), each rayon thread accumulates SortEntry items in a local buffer. When the buffer exceeds a size threshold, it is sorted by key and flushed to a chunk file.

Each chunk file contains a sequence of length-prefixed postcard frames compressed with LZ4.

Structs§

ChunkReader
Streaming reader for a single chunk file.
ChunkSink
Manages writing sorted chunk files to a temporary directory.
SortBuffer
A thread-local buffer that accumulates sort entries and flushes to a ChunkSink when the buffer exceeds the size threshold.

Functions§

read_chunk
Read all sort entries from a chunk file, in order.