fn cleanup_range(
        &self,
        region_id: u64,
        start_key: &[u8],
        end_key: &[u8],
        use_delete_files: bool,
    ) {
        if use_delete_files {
            if let Err(e) = self
                .engines
                .kv
                .delete_all_files_in_range(start_key, end_key)
            {
                error!(
                    "failed to delete files in range";
                    "region_id" => region_id,
                    "start_key" => log_wrappers::Key(start_key),
                    "end_key" => log_wrappers::Key(end_key),
                    "err" => %e,
                    "error_code" => %e.error_code(),
                );
                return;
            }
        }
        if let Err(e) =
            self.engines
                .kv
                .delete_all_in_range(start_key, end_key, self.use_delete_range)
        {
            error!(
                "failed to delete data in range";
                "region_id" => region_id,
                "start_key" => log_wrappers::Key(start_key),
                "end_key" => log_wrappers::Key(end_key),
                "err" => %e,
                "error_code" => %e.error_code(),
            );
        } else {
            info!(
                "succeed in deleting data in range";
                "region_id" => region_id,
                "start_key" => log_wrappers::Key(start_key),
                "end_key" => log_wrappers::Key(end_key),
            );
        }
    }
/// Cleans up the data within the range.
Cleans up the data within the range.
Cleans up the data within the range .
fn cleanup_range(
        &self,
        region_id: u64,
        start_key: &[u8],
        end_key: &[u8],
        use_delete_files: bool,
    ) {
        if use_delete_files {
            if let Err(e) = self
                .engines
                .kv
                .delete_all_files_in_range(start_key, end_key)
            {
                error!(
                    "failed to delete files in range";
                    "region_id" => region_id,
                    "start_key" => log_wrappers::Key(start_key),
                    "end_key" => log_wrappers::Key(end_key),
                    "err" => %e,
                    "error_code" => %e.error_code(),
                );
                return;
            }
        }
        if let Err(e) =
            self.engines
                .kv
                .delete_all_in_range(start_key, end_key, self.use_delete_range)
        {
            error!(
                "failed to delete data in range";
                "region_id" => region_id,
                "start_key" => log_wrappers::Key(start_key),
                "end_key" => log_wrappers::Key(end_key),
                "err" => %e,
                "error_code" => %e.error_code(),
            );
        } else {
            info!(
                "succeed in deleting data in range";
                "region_id" => region_id,
                "start_key" => log_wrappers::Key(start_key),
                "end_key" => log_wrappers::Key(end_key),
            );
        }
    }
fn cleanup_range ( & self , region_id : u64 , start_key : & [ u8 ] , end_key : & [ u8 ] , use_delete_files : bool , ) { if use_delete_files { if let Err ( e ) = self . engines . kv . delete_all_files_in_range ( start_key , end_key ) { error ! ( " " " " region_id " " log_wrappers Key ( start_key ) " " log_wrappers Key ( end_key ) " " e " " e error_code ( ) ) ; return ; } } if let Err ( e ) = self . engines . kv . delete_all_in_range ( start_key , end_key , self . use_delete_range ) { error ! ( " " " " region_id " " log_wrappers Key ( start_key ) " " log_wrappers Key ( end_key ) " " e " " e error_code ( ) ) ; } else { info ! ( " " " " region_id " " log_wrappers Key ( start_key ) " " log_wrappers Key ( end_key ) ) ; } }
Cleans up the data within the range.
Cleans up the data within the range .
&self
region_id
u64
start_key
&[u8]
end_key
&[u8]
use_delete_files
bool