[][src]Struct cmd::server::TiKVServer

struct TiKVServer<ER: RaftEngine> {
    config: TiKvConfig,
    cfg_controller: Option<ConfigController>,
    security_mgr: Arc<SecurityManager>,
    pd_client: Arc<RpcClient>,
    router: RaftRouter<RocksEngine, ER>,
    system: Option<RaftBatchSystem<RocksEngine, ER>>,
    resolver: PdStoreAddrResolver,
    state: Arc<Mutex<GlobalReplicationState>>,
    store_path: PathBuf,
    encryption_key_manager: Option<Arc<DataKeyManager>>,
    engines: Option<TiKVEngines<ER>>,
    servers: Option<Servers<ER>>,
    region_info_accessor: RegionInfoAccessor,
    coprocessor_host: Option<CoprocessorHost<RocksEngine>>,
    to_stop: Vec<Box<dyn Stop>>,
    lock_files: Vec<File>,
    concurrency_manager: ConcurrencyManager,
    env: Arc<Environment>,
    background_worker: Worker,
}

A complete TiKV server.

Fields

config: TiKvConfigcfg_controller: Option<ConfigController>security_mgr: Arc<SecurityManager>pd_client: Arc<RpcClient>router: RaftRouter<RocksEngine, ER>system: Option<RaftBatchSystem<RocksEngine, ER>>resolver: PdStoreAddrResolverstate: Arc<Mutex<GlobalReplicationState>>store_path: PathBufencryption_key_manager: Option<Arc<DataKeyManager>>engines: Option<TiKVEngines<ER>>servers: Option<Servers<ER>>region_info_accessor: RegionInfoAccessorcoprocessor_host: Option<CoprocessorHost<RocksEngine>>to_stop: Vec<Box<dyn Stop>>lock_files: Vec<File>concurrency_manager: ConcurrencyManagerenv: Arc<Environment>background_worker: Worker

Implementations

impl<ER: RaftEngine> TiKVServer<ER>[src]

fn init(mut config: TiKvConfig) -> TiKVServer<ER>[src]

fn init_config(mut config: TiKvConfig) -> ConfigController[src]

Initialize and check the config

Warnings are logged and fatal errors exist.

Fatal errors

  • If dynamic config feature is enabled and failed to register config to PD
  • If some critical configs (like data dir) are differrent from last run
  • If the config can't pass validate()
  • If the max open file descriptor limit is not high enough to support the main database and the raft database.

fn connect_to_pd_cluster(
    config: &mut TiKvConfig,
    env: Arc<Environment>,
    security_mgr: Arc<SecurityManager>
) -> Arc<RpcClient>
[src]

fn check_conflict_addr(&mut self)[src]

fn init_fs(&mut self)[src]

fn init_yatp(&self)[src]

fn init_encryption(&mut self)[src]

fn create_raftstore_compaction_listener(&self) -> CompactionListener[src]

fn init_engines(&mut self, engines: Engines<RocksEngine, ER>)[src]

fn init_gc_worker(
    &mut self
) -> GcWorker<RaftKv<ServerRaftStoreRouter<RocksEngine, ER>>, RaftRouter<RocksEngine, ER>>
[src]

fn init_servers(&mut self) -> Arc<ServerConfig>[src]

fn register_services(&mut self)[src]

fn init_io_utility(&mut self) -> BytesFetcher[src]

fn init_metrics_flusher(&mut self, fetcher: BytesFetcher)[src]

fn run_server(&mut self, server_config: Arc<ServerConfig>)[src]

fn run_status_server(&mut self)[src]

fn stop(self)[src]

impl TiKVServer<RocksEngine>[src]

fn init_raw_engines(&mut self) -> Engines<RocksEngine, RocksEngine>[src]

impl TiKVServer<RaftLogEngine>[src]

fn init_raw_engines(&mut self) -> Engines<RocksEngine, RaftLogEngine>[src]

Auto Trait Implementations

impl<ER> !RefUnwindSafe for TiKVServer<ER>[src]

impl<ER> !Send for TiKVServer<ER>[src]

impl<ER> !Sync for TiKVServer<ER>[src]

impl<ER> Unpin for TiKVServer<ER> where
    ER: Unpin
[src]

impl<ER> !UnwindSafe for TiKVServer<ER>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<V, W> ConvertFrom<W> for V where
    W: ConvertTo<V>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> Sealed<T> for T where
    T: ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]