Repository: tikv/tikv
File: src/server/config.rs (Rust)

Code before:
    // whether to compact metrics or not.
    #[doc(hidden)]
    pub simplify_metrics: bool,

    #[doc(hidden)]
    #[online_config(skip)]
    /// Minimum interval to send health feedback information in each
    /// `BatchCommands` gRPC stream. 0 to disable sending health feedback.
    pub health_feedback_interval: ReadableDuration,

    #[doc(hidden)]
    #[online_config(hidden)]
    // Interval to inspect the network latency between tikv and tikv for slow store detection.
    // If it set to 0, it will disable the inspection.
    pub inspect_network_interval: ReadableDuration,
    /// Enable graceful shutdown for TiKV server.
    /// When enabled, TiKV will perform graceful shutdown operations like
    /// leader eviction before terminating.
    #[online_config(skip)]
    pub enable_graceful_shutdown: bool,

    /// Timeout for leader eviction during graceful shutdown.
    /// After this timeout, TiKV will proceed with shutdown even if
    /// some regions haven't completed leader transfer.
    #[online_config(skip)]
    pub evict_leader_timeout: ReadableDuration,

    // Server labels to specify some attributes about this server.
    #[online_config(skip)]
    pub labels: HashMap<String, String>,

    #[doc(hidden)]
    #[serde(skip_serializing)]
    #[online_config(hidden)]
    #[deprecated = "The configuration has been moved to readpool.coprocessor.*_concurrency."]
    pub end_point_concurrency: Option<usize>,

    #[doc(hidden)]
    #[serde(skip_serializing)]
    #[online_config(hidden)]
    #[deprecated = "The configuration has been moved to readpool.coprocessor.stack_size."]
    pub end_point_stack_size: Option<ReadableSize>,

    #[doc(hidden)]
    #[serde(skip_serializing)]
    #[online_config(hidden)]
    #[deprecated = "The configuration has been moved to readpool.coprocessor.max_tasks_per_worker_*."]
    pub end_point_max_tasks: Option<usize>,
}

impl Default for Config {

Review comment (suggestion):
```suggestion
    pub graceful_shutdown_timeout: ReadableDuration,
```

How about `graceful_shutdown_timeout`? It's more intuitive.

Code after:
    // whether to compact metrics or not.
    #[doc(hidden)]
    pub simplify_metrics: bool,

    #[doc(hidden)]
    #[online_config(skip)]
    /// Minimum interval to send health feedback information in each
    /// `BatchCommands` gRPC stream. 0 to disable sending health feedback.
    pub health_feedback_interval: ReadableDuration,

    #[doc(hidden)]
    #[online_config(hidden)]
    // Interval to inspect the network latency between tikv and tikv for slow store detection.
    // If it set to 0, it will disable the inspection.
    pub inspect_network_interval: ReadableDuration,

    /// Timeout for leader eviction during graceful shutdown.
    /// After this timeout, TiKV will proceed with shutdown even if
    /// some regions haven't completed leader transfer.
    pub graceful_shutdown_timeout: ReadableDuration,

    // Server labels to specify some attributes about this server.
    #[online_config(skip)]
    pub labels: HashMap<String, String>,

    #[doc(hidden)]
    #[serde(skip_serializing)]
    #[online_config(hidden)]
    #[deprecated = "The configuration has been moved to readpool.coprocessor.*_concurrency."]
    pub end_point_concurrency: Option<usize>,

    #[doc(hidden)]
    #[serde(skip_serializing)]
    #[online_config(hidden)]
    #[deprecated = "The configuration has been moved to readpool.coprocessor.stack_size."]
    pub end_point_stack_size: Option<ReadableSize>,

    #[doc(hidden)]
    #[serde(skip_serializing)]
    #[online_config(hidden)]
    #[deprecated = "The configuration has been moved to readpool.coprocessor.max_tasks_per_worker_*."]
    pub end_point_max_tasks: Option<usize>,
}

impl Default for Config {
    #[allow(deprecated)]
    fn default() -> Config {
        let cpu_num = SysQuota::cpu_cores_quota();
        let background_thread_count = if cpu_num > 16.0 { 3 } else { 2 };
        Config {
            cluster_id: DEFAULT_CLUSTER_ID,