#[non_exhaustive]pub struct SplitSpec {
pub id: SplitId,
pub descriptor: Vec<u8>,
pub weight: u64,
}Expand description
One unit of leasable work, as the planner enumerated it.
The descriptor is carried verbatim to whichever worker gains the split, so workers never re-enumerate the input (one LIST/scan per plan, on the leader). It is opaque to the framework and to backends; keep it small — backends enforce a size cap (the NATS backend: a fixed 512 KiB per stored value). Descriptors are written once at planning and never rewritten by commits, so their size never taxes the commit path.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: SplitIdDeterministic identity, stable across replans of unchanged work.
descriptor: Vec<u8>Source-defined payload: everything a worker needs to process the split (an object-store source: member keys with etags and sizes; a database source: an id range).
weight: u64Relative cost hint (bytes, rows) — the balance objective.
This is load, not sort order. Under the work-stealing balancer this field only ordered claims and balance was on split count; a planner that populated it as a ranking key rather than a cost will now skew the leader’s distribution.
The
leader distributes summed weight, not split count, so a planner
that emits wildly uneven splits (an object-store planner gives any
object at or above its packing target a split to itself) still
balances correctly. A planner that leaves every weight at the
default degrades to count-balancing, which is the right behaviour
when splits really are uniform. 0 is treated as 1.
Implementations§
Trait Implementations§
impl Eq for SplitSpec
impl StructuralPartialEq for SplitSpec
Auto Trait Implementations§
impl Freeze for SplitSpec
impl RefUnwindSafe for SplitSpec
impl Send for SplitSpec
impl Sync for SplitSpec
impl Unpin for SplitSpec
impl UnsafeUnpin for SplitSpec
impl UnwindSafe for SplitSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.