pub struct DefaultShardExtractor { /* private fields */ }Expand description
Hash-based default extractor: FNV-1a 64-bit (entity_id) % num_shards.
§Cross-node shard stability contract
The FNV-1a 64-bit hash used here is version-stable forever (public-domain
constants). Every Datum node that runs the same num_shards MUST produce identical
shard_id values for the same entity_id, regardless of Rust compiler version,
target OS/arch, or Datum release. This prevents split-entity faults in
mixed-version clusters during rolling upgrades. The golden test
golden_shard_map_is_stable pins known entity-id-to-shard mappings; any hash
change will fail that test loudly.
A one-time re-mapping of existing entities onto new shards after the switch from
std::DefaultHasher (SipHash) to FNV-1a is expected and acceptable pre-1.0.
Implementations§
Trait Implementations§
Source§impl Clone for DefaultShardExtractor
impl Clone for DefaultShardExtractor
Source§fn clone(&self) -> DefaultShardExtractor
fn clone(&self) -> DefaultShardExtractor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DefaultShardExtractor
impl Debug for DefaultShardExtractor
Source§impl<M> ShardExtractor<M> for DefaultShardExtractor
impl<M> ShardExtractor<M> for DefaultShardExtractor
Auto Trait Implementations§
impl Freeze for DefaultShardExtractor
impl RefUnwindSafe for DefaultShardExtractor
impl Send for DefaultShardExtractor
impl Sync for DefaultShardExtractor
impl Unpin for DefaultShardExtractor
impl UnsafeUnpin for DefaultShardExtractor
impl UnwindSafe for DefaultShardExtractor
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
Mutably borrows from an owned value. Read more
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Message for T
impl<T> Message for T
Source§fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
Convert a BoxedMessage to this concrete type
Source§fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
Convert this message to a BoxedMessage