Struct raftstore::store::fsm::store::StoreMeta [−][src]
Fields
store_id: Option<u64>
store id
region_ranges: BTreeMap<Vec<u8>, u64>
region_end_key -> region_id
regions: HashMap<u64, Region>
region_id -> region
readers: HashMap<u64, ReadDelegate>
region_id -> reader
leaders: HashMap<u64, (u64, u64)>
region_id -> (term, leader_peer_id)
pending_msgs: RingQueue<RaftMessage>
MsgRequestPreVote
, MsgRequestVote
or MsgAppend
messages from newly split Regions shouldn’t be
dropped if there is no such Region in this store now. So the messages are recorded temporarily and
will be handled later.
pending_snapshot_regions: Vec<Region>
The regions with pending snapshots.
pending_merge_targets: HashMap<u64, HashMap<u64, Region>>
A marker used to indicate the peer of a Region has received a merge target message and waits to be destroyed. target_region_id -> (source_region_id -> merge_target_region)
targets_map: HashMap<u64, u64>
An inverse mapping of pending_merge_targets
used to let source peer help target peer to clean up related entry.
source_region_id -> target_region_id
atomic_snap_regions: HashMap<u64, HashMap<u64, bool>>
atomic_snap_regions
and destroyed_region_for_snap
are used for making destroy overlapped regions
and apply snapshot atomically.
region_id -> wait_destroy_regions_map(source_region_id -> is_ready)
A target peer must wait for all source peer to ready before applying snapshot.
destroyed_region_for_snap: HashMap<u64, bool>
source_region_id -> need_atomic
Used for reminding the source peer to switch to ready in atomic_snap_regions
.
region_read_progress: HashMap<u64, Arc<RegionReadProgress>>
Implementations
impl StoreMeta
[src]
pub fn new(vote_capacity: usize) -> StoreMeta
[src]
pub fn set_region<EK: KvEngine, ER: RaftEngine>(
&mut self,
host: &CoprocessorHost<EK>,
region: Region,
peer: &mut Peer<EK, ER>
)
[src]
&mut self,
host: &CoprocessorHost<EK>,
region: Region,
peer: &mut Peer<EK, ER>
)
Auto Trait Implementations
impl RefUnwindSafe for StoreMeta
impl Send for StoreMeta
impl Sync for StoreMeta
impl Unpin for StoreMeta
impl UnwindSafe for StoreMeta
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<V, W> ConvertFrom<W> for V where
W: ConvertTo<V>,
[src]
W: ConvertTo<V>,
pub fn convert_from(ctx: &mut EvalContext, from: W) -> Result<V, Error>
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,