Struct raftstore::store::fsm::store::PollContext [−][src]
Fields
processed_fsm_count: usize
The count of processed normal Fsm.
cfg: Config
store: Store
pd_scheduler: FutureScheduler<PdTask<EK>>
consistency_check_scheduler: Scheduler<ConsistencyCheckTask<EK::Snapshot>>
split_check_scheduler: Scheduler<SplitCheckTask>
cleanup_scheduler: Scheduler<CleanupTask>
raftlog_gc_scheduler: Scheduler<RaftlogGcTask>
region_scheduler: Scheduler<RegionTask<EK::Snapshot>>
apply_router: ApplyRouter<EK>
router: RaftRouter<EK, ER>
importer: Arc<SSTImporter>
store_meta: Arc<Mutex<StoreMeta>>
feature_gate: FeatureGate
pending_create_peers: Arc<Mutex<HashMap<u64, (u64, bool)>>>
region_id -> (peer_id, is_splitting) Used for handling race between splitting and creating new peer. An uninitialized peer can be replaced to the one from splitting iff they are exactly the same peer.
WARNING:
To avoid deadlock, if you want to use store_meta
and pending_create_peers
together,
the lock sequence MUST BE:
- lock the store_meta.
- lock the pending_create_peers.
raft_metrics: RaftMetrics
snap_mgr: SnapManager
coprocessor_host: CoprocessorHost<EK>
timer: SteadyTimer
trans: T
global_replication_state: Arc<Mutex<GlobalReplicationState>>
global_stat: GlobalStoreStat
store_stat: LocalStoreStat
engines: Engines<EK, ER>
kv_wb: EK::WriteBatch
raft_wb: ER::LogBatch
pending_count: usize
sync_log: bool
has_ready: bool
ready_res: Vec<CollectedReady>
current_time: Option<Timespec>
perf_context: EK::PerfContext
tick_batch: Vec<PeerTickBatch>
node_start_time: Option<TiInstant>
Implementations
impl<EK, ER, T> PollContext<EK, ER, T> where
EK: KvEngine,
ER: RaftEngine,
[src]
EK: KvEngine,
ER: RaftEngine,
pub fn store_id(&self) -> u64
[src]
pub fn update_ticks_timeout(&mut self)
[src]
impl<EK, ER, T: Transport> PollContext<EK, ER, T> where
EK: KvEngine,
ER: RaftEngine,
[src]
EK: KvEngine,
ER: RaftEngine,
fn schedule_store_tick(&self, tick: StoreTick, timeout: Duration)
[src]
pub fn handle_stale_msg(
&mut self,
msg: &RaftMessage,
cur_epoch: RegionEpoch,
need_gc: bool,
target_region: Option<Region>
)
[src]
&mut self,
msg: &RaftMessage,
cur_epoch: RegionEpoch,
need_gc: bool,
target_region: Option<Region>
)
Trait Implementations
impl<EK, ER, T> HandleRaftReadyContext<<EK as WriteBatchExt>::WriteBatch, <ER as RaftEngine>::LogBatch> for PollContext<EK, ER, T> where
EK: KvEngine,
ER: RaftEngine,
[src]
EK: KvEngine,
ER: RaftEngine,
fn wb_mut(&mut self) -> (&mut EK::WriteBatch, &mut ER::LogBatch)
[src]
fn kv_wb_mut(&mut self) -> &mut EK::WriteBatch
[src]
fn raft_wb_mut(&mut self) -> &mut ER::LogBatch
[src]
fn sync_log(&self) -> bool
[src]
fn set_sync_log(&mut self, sync: bool)
[src]
impl<EK, ER, T> ReadExecutor<EK> for PollContext<EK, ER, T> where
EK: KvEngine,
ER: RaftEngine,
[src]
EK: KvEngine,
ER: RaftEngine,
fn get_engine(&self) -> &EK
[src]
fn get_snapshot(&mut self, _: Option<ThreadReadId>) -> Arc<EK::Snapshot>
[src]
fn get_value(&self, req: &Request, region: &Region) -> Result<Response>
[src]
fn execute(
&mut self,
msg: &RaftCmdRequest,
region: &Arc<Region>,
read_index: Option<u64>,
ts: Option<ThreadReadId>
) -> ReadResponse<E::Snapshot>
[src]
&mut self,
msg: &RaftCmdRequest,
region: &Arc<Region>,
read_index: Option<u64>,
ts: Option<ThreadReadId>
) -> ReadResponse<E::Snapshot>
Auto Trait Implementations
impl<EK, ER, T> !RefUnwindSafe for PollContext<EK, ER, T>
impl<EK, ER, T> Send for PollContext<EK, ER, T> where
T: Send,
T: Send,
impl<EK, ER, T> !Sync for PollContext<EK, ER, T>
impl<EK, ER, T> Unpin for PollContext<EK, ER, T> where
ER: Unpin,
T: Unpin,
<ER as RaftEngine>::LogBatch: Unpin,
<EK as PerfContextExt>::PerfContext: Unpin,
<EK as WriteBatchExt>::WriteBatch: Unpin,
ER: Unpin,
T: Unpin,
<ER as RaftEngine>::LogBatch: Unpin,
<EK as PerfContextExt>::PerfContext: Unpin,
<EK as WriteBatchExt>::WriteBatch: Unpin,
impl<EK, ER, T> !UnwindSafe for PollContext<EK, ER, T>
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, 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>,