Struct raftstore::store::worker::region::SnapContext [−][src]
Fields
engine: EK
batch_size: usize
mgr: SnapManager
use_delete_range: bool
pending_delete_ranges: PendingDeleteRanges
coprocessor_host: CoprocessorHost<EK>
router: R
Implementations
impl<EK, R> SnapContext<EK, R> where
EK: KvEngine,
R: CasualRouter<EK>,
[src]
EK: KvEngine,
R: CasualRouter<EK>,
fn generate_snap(
&self,
region_id: u64,
last_applied_index_term: u64,
last_applied_state: RaftApplyState,
kv_snap: EK::Snapshot,
notifier: SyncSender<RaftSnapshot>,
for_balance: bool
) -> Result<(), Error>
[src]
&self,
region_id: u64,
last_applied_index_term: u64,
last_applied_state: RaftApplyState,
kv_snap: EK::Snapshot,
notifier: SyncSender<RaftSnapshot>,
for_balance: bool
) -> Result<(), Error>
Generates the snapshot of the Region.
fn handle_gen(
&self,
region_id: u64,
last_applied_index_term: u64,
last_applied_state: RaftApplyState,
kv_snap: EK::Snapshot,
canceled: Arc<AtomicBool>,
notifier: SyncSender<RaftSnapshot>,
for_balance: bool
)
[src]
&self,
region_id: u64,
last_applied_index_term: u64,
last_applied_state: RaftApplyState,
kv_snap: EK::Snapshot,
canceled: Arc<AtomicBool>,
notifier: SyncSender<RaftSnapshot>,
for_balance: bool
)
Handles the task of generating snapshot of the Region. It calls generate_snap
to do the actual work.
fn apply_snap(
&mut self,
region_id: u64,
abort: Arc<AtomicUsize>
) -> Result<(), Error>
[src]
&mut self,
region_id: u64,
abort: Arc<AtomicUsize>
) -> Result<(), Error>
Applies snapshot data of the Region.
fn handle_apply(&mut self, region_id: u64, status: Arc<AtomicUsize>)
[src]
Tries to apply the snapshot of the specified Region. It calls apply_snap
to do the actual work.
fn cleanup_range(&self, ranges: &[Range<'_>]) -> Result<(), Error>
[src]
Cleans up the data within the range.
fn cleanup_overlap_ranges(
&mut self,
start_key: &[u8],
end_key: &[u8]
) -> Result<(), Error>
[src]
&mut self,
start_key: &[u8],
end_key: &[u8]
) -> Result<(), Error>
Gets the overlapping ranges and cleans them up.
fn insert_pending_delete_range(
&mut self,
region_id: u64,
start_key: &[u8],
end_key: &[u8]
)
[src]
&mut self,
region_id: u64,
start_key: &[u8],
end_key: &[u8]
)
Inserts a new pending range, and it will be cleaned up with some delay.
fn clean_stale_ranges(&mut self)
[src]
Cleans up stale ranges.
fn ingest_maybe_stall(&self) -> bool
[src]
Checks the number of files at level 0 to avoid write stall after ingesting sst. Returns true if the ingestion causes write stall.
fn delete_all_in_range(&self, ranges: &[Range<'_>]) -> Result<(), Error>
[src]
Trait Implementations
impl<EK: Clone, R: Clone> Clone for SnapContext<EK, R> where
EK: KvEngine,
[src]
EK: KvEngine,
fn clone(&self) -> SnapContext<EK, R>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl<EK, R> !RefUnwindSafe for SnapContext<EK, R>
impl<EK, R> Send for SnapContext<EK, R> where
R: Send,
R: Send,
impl<EK, R> !Sync for SnapContext<EK, R>
impl<EK, R> Unpin for SnapContext<EK, R> where
R: Unpin,
R: Unpin,
impl<EK, R> !UnwindSafe for SnapContext<EK, R>
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,