Skip to main content

laminar_core/shuffle/
mod.rs

1//! Cross-instance shuffle over Tonic gRPC client-streaming: one
2//! client-streaming call per peer pair carrying [`ShuffleMessage`] frames.
3//! Backpressure is the HTTP/2 flow-control window plus the bounded crossfire
4//! inbound queue on the consuming side. The real transport is compiled under
5//! `cluster`; the default build keeps a networking-free shim.
6
7pub mod message;
8pub mod routing;
9mod topology;
10pub mod transport;
11
12pub use topology::ShuffleTopologyFence;
13
14pub use message::ShuffleMessage;
15pub use routing::{
16    logical_batch_bytes, route_checkpointed_batch, row_vnodes, CheckpointRoutePlan, LocalRoute,
17    RemoteRoute, ShuffleRoutingError, ROUTE_MAX_BATCH_BYTES, ROUTE_MAX_BATCH_ROWS,
18    ROUTE_TARGET_BATCH_BYTES,
19};
20pub use transport::{
21    is_scope_cancelled, ReceivedBatch, ReceivedFrontierCut, ReceivedShuffle, ShuffleBatchAdmission,
22    ShufflePeerId, ShuffleReceiver, ShuffleSender,
23};
24#[cfg(feature = "cluster")]
25pub use transport::{
26    is_shuffle_send_stalled, shuffle_send_may_have_been_admitted, ShufflePeerFlow, SHUFFLE_ADDR_KEY,
27};
28
29/// Data bytes a node's shuffle endpoints hold in each direction, summed over its peers.
30#[cfg(feature = "cluster")]
31pub const SHUFFLE_NODE_BUDGET_BYTES: usize = 128 * 1024 * 1024;