pub fn propose_check_epoch(&mut self, req: &RaftCmdRequest, term: u64) -> Option<u64> {
        self.maybe_update_term(term);
        let (check_ver, check_conf_ver) = if !req.has_admin_request() {
            (NORMAL_REQ_CHECK_VER, NORMAL_REQ_CHECK_CONF_VER)
        } else {
            let cmd_type = req.get_admin_request().get_cmd_type();
            // Due to `test_admin_cmd_epoch_map_include_all_cmd_type`, using unwrap is ok.
            let epoch_state = *ADMIN_CMD_EPOCH_MAP.get(&cmd_type).unwrap();
            (epoch_state.check_ver, epoch_state.check_ver)
        };
        self.last_conflict_index(check_ver, check_conf_ver)
    }
/// Check if the proposal can be proposed on the basis of its epoch and previous proposed admin cmds.
///
/// Returns None if passing the epoch check, otherwise returns a index which is the last
/// admin cmd index conflicted with this proposal.
Check if the proposal can be proposed on the basis of its epoch and previous proposed admin cmds.
Returns None if passing the epoch check, otherwise returns a index which is the last
admin cmd index conflicted with this proposal.
Check if the proposal can be proposed on the basis of its epoch and previous proposed admin cmds . Returns None if passing the epoch check otherwise returns a index which is the last admin cmd index conflicted with this proposal .
pub fn propose_check_epoch(&mut self, req: &RaftCmdRequest, term: u64) -> Option<u64> {
        self.maybe_update_term(term);
        let (check_ver, check_conf_ver) = if !req.has_admin_request() {
            (NORMAL_REQ_CHECK_VER, NORMAL_REQ_CHECK_CONF_VER)
        } else {
            let cmd_type = req.get_admin_request().get_cmd_type();
            // Due to `test_admin_cmd_epoch_map_include_all_cmd_type`, using unwrap is ok.
            let epoch_state = *ADMIN_CMD_EPOCH_MAP.get(&cmd_type).unwrap();
            (epoch_state.check_ver, epoch_state.check_ver)
        };
        self.last_conflict_index(check_ver, check_conf_ver)
    }
pub fn propose_check_epoch ( & mut self , req : & RaftCmdRequest , term : u64 ) -> Option < u64 > { self . maybe_update_term ( term ) ; let ( check_ver , check_conf_ver ) = if ! req . has_admin_request ( ) { ( NORMAL_REQ_CHECK_VER , NORMAL_REQ_CHECK_CONF_VER ) } else { let cmd_type = req . get_admin_request ( ) . get_cmd_type ( ) ; // Due to `test_admin_cmd_epoch_map_include_all_cmd_type`, using unwrap is ok. let epoch_state = * ADMIN_CMD_EPOCH_MAP . get ( & cmd_type ) . unwrap ( ) ; ( epoch_state . check_ver , epoch_state . check_ver ) } ; self . last_conflict_index ( check_ver , check_conf_ver ) }
Check if the proposal can be proposed on the basis of its epoch and previous proposed admin cmds.
Check if the proposal can be proposed on the basis of its epoch and previous proposed admin cmds .
&mut self
req
&RaftCmdRequest
term
u64