#[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 opaque descriptor travels to each worker that gains the split and is written once at planning. The portable complete stored-value budget is 384 KiB, which every built-in store accepts. Under the current encoding, descriptors up to 294,720 raw bytes reserve padded-base64 expansion and the maximum spec record envelope.
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), and the balance objective.
This is load, not sort order. A planner that populates it as a ranking key rather than a cost skews 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 a
large object it cannot cut into ranges a split to itself) still
balances correctly. A planner that leaves every weight at the
default degrades to count-balancing, which is correct when splits
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.