Struct tikv::server::gc_worker::GcWorker [−][src]
Used to schedule GC operations.
Fields
engine: E
raft_store_router: RR
raft_store_router
is useful to signal raftstore clean region size informations.
config_manager: GcWorkerConfigManager
scheduled_tasks: Arc<AtomicUsize>
How many requests are scheduled from outside and unfinished.
refs: Arc<AtomicUsize>
How many strong references. The worker will be stopped once there are no more references.
worker: Arc<Mutex<FutureWorker<GcTask>>>
worker_scheduler: FutureScheduler<GcTask>
applied_lock_collector: Option<Arc<AppliedLockCollector>>
gc_manager_handle: Arc<Mutex<Option<GcManagerHandle>>>
feature_gate: FeatureGate
Implementations
impl<E, RR> GcWorker<E, RR> where
E: Engine,
RR: RaftStoreRouter<RocksEngine>,
[src]
E: Engine,
RR: RaftStoreRouter<RocksEngine>,
pub fn new(
engine: E,
raft_store_router: RR,
cfg: GcConfig,
feature_gate: FeatureGate
) -> GcWorker<E, RR>
[src]
engine: E,
raft_store_router: RR,
cfg: GcConfig,
feature_gate: FeatureGate
) -> GcWorker<E, RR>
pub fn start_auto_gc<S: GcSafePointProvider, R: RegionInfoProvider + Clone + 'static>(
&self,
cfg: AutoGcConfig<S, R>,
safe_point: Arc<AtomicU64>
) -> Result<()>
[src]
&self,
cfg: AutoGcConfig<S, R>,
safe_point: Arc<AtomicU64>
) -> Result<()>
pub fn start(&mut self) -> Result<()>
[src]
pub fn start_observe_lock_apply(
&mut self,
coprocessor_host: &mut CoprocessorHost<RocksEngine>,
concurrency_manager: ConcurrencyManager
) -> Result<()>
[src]
&mut self,
coprocessor_host: &mut CoprocessorHost<RocksEngine>,
concurrency_manager: ConcurrencyManager
) -> Result<()>
pub fn stop(&self) -> Result<()>
[src]
pub fn scheduler(&self) -> FutureScheduler<GcTask>
[src]
fn check_is_busy<T: 'static>(
&self,
callback: Callback<T>
) -> Option<Callback<T>>
[src]
&self,
callback: Callback<T>
) -> Option<Callback<T>>
Check whether GCWorker is busy. If busy, callback will be invoked with an error that indicates GCWorker is busy; otherwise, return a new callback that invokes the original callback as well as decrease the scheduled task counter.
pub fn gc(&self, safe_point: TimeStamp, callback: Callback<()>) -> Result<()>
[src]
Only for tests.
pub fn unsafe_destroy_range(
&self,
ctx: Context,
start_key: Key,
end_key: Key,
callback: Callback<()>
) -> Result<()>
[src]
&self,
ctx: Context,
start_key: Key,
end_key: Key,
callback: Callback<()>
) -> Result<()>
Cleans up all keys in a range and quickly free the disk space. The range might span over
multiple regions, and the ctx
doesn’t indicate region. The request will be done directly
on RocksDB, bypassing the Raft layer. User must promise that, after calling destroy_range
,
the range will never be accessed any more. However, destroy_range
is allowed to be called
multiple times on an single range.
pub fn get_config_manager(&self) -> GcWorkerConfigManager
[src]
pub fn physical_scan_lock(
&self,
ctx: Context,
max_ts: TimeStamp,
start_key: Key,
limit: usize,
callback: Callback<Vec<LockInfo>>
) -> Result<()>
[src]
&self,
ctx: Context,
max_ts: TimeStamp,
start_key: Key,
limit: usize,
callback: Callback<Vec<LockInfo>>
) -> Result<()>
pub fn start_collecting(
&self,
max_ts: TimeStamp,
callback: Box<dyn FnOnce(Result<()>) + Send>
) -> Result<()>
[src]
&self,
max_ts: TimeStamp,
callback: Box<dyn FnOnce(Result<()>) + Send>
) -> Result<()>
pub fn get_collected_locks(
&self,
max_ts: TimeStamp,
callback: Box<dyn FnOnce(Result<(Vec<LockInfo>, bool)>) + Send>
) -> Result<()>
[src]
&self,
max_ts: TimeStamp,
callback: Box<dyn FnOnce(Result<(Vec<LockInfo>, bool)>) + Send>
) -> Result<()>
pub fn stop_collecting(
&self,
max_ts: TimeStamp,
callback: Box<dyn FnOnce(Result<()>) + Send>
) -> Result<()>
[src]
&self,
max_ts: TimeStamp,
callback: Box<dyn FnOnce(Result<()>) + Send>
) -> Result<()>
Trait Implementations
impl<E, RR> Clone for GcWorker<E, RR> where
E: Engine,
RR: RaftStoreRouter<RocksEngine>,
[src]
E: Engine,
RR: RaftStoreRouter<RocksEngine>,
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<E, RR> Drop for GcWorker<E, RR> where
E: Engine,
RR: RaftStoreRouter<RocksEngine> + 'static,
[src]
E: Engine,
RR: RaftStoreRouter<RocksEngine> + 'static,
Auto Trait Implementations
impl<E, RR> !RefUnwindSafe for GcWorker<E, RR>
impl<E, RR> Send for GcWorker<E, RR>
impl<E, RR> Sync for GcWorker<E, RR> where
E: Sync,
RR: Sync,
E: Sync,
RR: Sync,
impl<E, RR> Unpin for GcWorker<E, RR> where
E: Unpin,
RR: Unpin,
E: Unpin,
RR: Unpin,
impl<E, RR> !UnwindSafe for GcWorker<E, RR>
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>,