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
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,
impl<V, W> ConvertFrom<W> for V where
W: ConvertTo<V>,
[src][+]
W: ConvertTo<V>,
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][+]
U: From<T>,
impl<T> Pointable for T
[src][+]
impl<T> Pointable for T
[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,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src][+]
V: MultiLane<T>,