Enum raftstore::store::msg::CasualMessage[][src]

pub enum CasualMessage<EK: KvEngine> {
    SplitRegion {
        region_epoch: RegionEpoch,
        split_keys: Vec<Vec<u8>>,
        callback: Callback<EK::Snapshot>,
        source: Cow<'static, str>,
    },
    ComputeHashResult {
        index: u64,
        context: Vec<u8>,
        hash: Vec<u8>,
    },
    RegionApproximateSize {
        size: u64,
    },
    RegionApproximateKeys {
        keys: u64,
    },
    CompactionDeclinedBytes {
        bytes: u64,
    },
    HalfSplitRegion {
        region_epoch: RegionEpoch,
        policy: CheckPolicy,
        source: &'static str,
    },
    GcSnap {
        snaps: Vec<(SnapKey, bool)>,
    },
    ClearRegionSize,
    RegionOverlapped,
    SnapshotGenerated,
    ForceCompactRaftLogs,
    AccessPeer(Box<dyn FnOnce(&mut dyn AbstractPeer) + Send + 'static>),
    QueryRegionLeaderResp {
        region: Region,
        leader: Peer,
    },
}

Message that will be sent to a peer.

These messages are not significant and can be dropped occasionally.

Variants

SplitRegion

Split the target region into several partitions.

Fields of SplitRegion

region_epoch: RegionEpochsplit_keys: Vec<Vec<u8>>callback: Callback<EK::Snapshot>source: Cow<'static, str>
ComputeHashResult

Hash result of ComputeHash command.

Fields of ComputeHashResult

index: u64context: Vec<u8>hash: Vec<u8>
RegionApproximateSize

Approximate size of target region. This message can only be sent by split-check thread.

Fields of RegionApproximateSize

size: u64
RegionApproximateKeys

Approximate key count of target region.

Fields of RegionApproximateKeys

keys: u64
CompactionDeclinedBytes

Fields of CompactionDeclinedBytes

bytes: u64
HalfSplitRegion

Half split the target region.

Fields of HalfSplitRegion

region_epoch: RegionEpochpolicy: CheckPolicysource: &'static str
GcSnap

Remove snapshot files in snaps.

Fields of GcSnap

snaps: Vec<(SnapKey, bool)>
ClearRegionSize

Clear region size cache.

RegionOverlapped

Indicate a target region is overlapped.

SnapshotGenerated

Notifies that a new snapshot has been generated.

ForceCompactRaftLogs

Generally Raft leader keeps as more as possible logs for followers, however ForceCompactRaftLogs only cares the leader itself.

AccessPeer(Box<dyn FnOnce(&mut dyn AbstractPeer) + Send + 'static>)

A message to access peer’s internal state.

QueryRegionLeaderResp

Region info from PD

Fields of QueryRegionLeaderResp

region: Regionleader: Peer

Trait Implementations

impl<EK: KvEngine> Debug for CasualMessage<EK>[src]

Auto Trait Implementations

impl<EK> !RefUnwindSafe for CasualMessage<EK>

impl<EK> Send for CasualMessage<EK>

impl<EK> !Sync for CasualMessage<EK>

impl<EK> Unpin for CasualMessage<EK>

impl<EK> !UnwindSafe for CasualMessage<EK>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<V, W> ConvertFrom<W> for V where
    W: ConvertTo<V>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> Sealed<T> for T where
    T: ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]