fn handle_gen(
        &self,
        region_id: u64,
        last_applied_index_term: u64,
        last_applied_state: RaftApplyState,
        kv_snap: EK::Snapshot,
        notifier: SyncSender<RaftSnapshot>,
    ) {
        SNAP_COUNTER.generate.all.inc();
        let start = tikv_util::time::Instant::now();

        if let Err(e) = self.generate_snap(
            region_id,
            last_applied_index_term,
            last_applied_state,
            kv_snap,
            notifier,
        ) {
            error!("failed to generate snap!!!"; "region_id" => region_id, "err" => %e, "error_code" => %e.error_code());
            return;
        }

        SNAP_COUNTER.generate.success.inc();
        SNAP_HISTOGRAM.generate.observe(start.elapsed_secs());
    }
/// Handles the task of generating snapshot of the Region. It calls `generate_snap` to do the actual work.
Handles the task of generating snapshot of the Region. It calls `generate_snap` to do the actual work.
Handles the task of generating snapshot of the Region . It calls ` generate_snap ` to do the actual work .
fn handle_gen(
        &self,
        region_id: u64,
        last_applied_index_term: u64,
        last_applied_state: RaftApplyState,
        kv_snap: EK::Snapshot,
        notifier: SyncSender<RaftSnapshot>,
    ) {
        SNAP_COUNTER.generate.all.inc();
        let start = tikv_util::time::Instant::now();
        if let Err(e) = self.generate_snap(
            region_id,
            last_applied_index_term,
            last_applied_state,
            kv_snap,
            notifier,
        ) {
            error!("failed to generate snap!!!"; "region_id" => region_id, "err" => %e, "error_code" => %e.error_code());
            return;
        }
        SNAP_COUNTER.generate.success.inc();
        SNAP_HISTOGRAM.generate.observe(start.elapsed_secs());
    }
fn handle_gen ( & self , region_id : u64 , last_applied_index_term : u64 , last_applied_state : RaftApplyState , kv_snap : EK :: Snapshot , notifier : SyncSender < RaftSnapshot > , ) { SNAP_COUNTER . generate . all . inc ( ) ; let start = tikv_util :: time :: Instant :: now ( ) ; if let Err ( e ) = self . generate_snap ( region_id , last_applied_index_term , last_applied_state , kv_snap , notifier , ) { error ! ( " " " " region_id " " e " " e error_code ( ) ) ; return ; } SNAP_COUNTER . generate . success . inc ( ) ; SNAP_HISTOGRAM . generate . observe ( start . elapsed_secs ( ) ) ; }
Handles the task of generating snapshot of the Region.
Handles the task of generating snapshot of the Region .
&self
region_id
u64
last_applied_index_term
u64
last_applied_state
RaftApplyState
kv_snap
EK::Snapshot
notifier
SyncSender<RaftSnapshot>