fn is_request_urgent(req: &RaftCmdRequest) -> bool {
    if !req.has_admin_request() {
        return false;
    }

    match req.get_admin_request().get_cmd_type() {
        AdminCmdType::Split
        | AdminCmdType::BatchSplit
        | AdminCmdType::ChangePeer
        | AdminCmdType::ChangePeerV2
        | AdminCmdType::ComputeHash
        | AdminCmdType::VerifyHash
        | AdminCmdType::PrepareMerge
        | AdminCmdType::CommitMerge
        | AdminCmdType::RollbackMerge => true,
        _ => false,
    }
}
/// We enable follower lazy commit to get a better performance.
/// But it may not be appropriate for some requests. This function
/// checks whether the request should be committed on all followers
/// as soon as possible.
We enable follower lazy commit to get a better performance.
But it may not be appropriate for some requests. This function
checks whether the request should be committed on all followers
as soon as possible.
We enable follower lazy commit to get a better performance . But it may not be appropriate for some requests . This function checks whether the request should be committed on all followers as soon as possible .
fn is_request_urgent(req: &RaftCmdRequest) -> bool {
    if !req.has_admin_request() {
        return false;
    }
    match req.get_admin_request().get_cmd_type() {
        AdminCmdType::Split
        | AdminCmdType::BatchSplit
        | AdminCmdType::ChangePeer
        | AdminCmdType::ChangePeerV2
        | AdminCmdType::ComputeHash
        | AdminCmdType::VerifyHash
        | AdminCmdType::PrepareMerge
        | AdminCmdType::CommitMerge
        | AdminCmdType::RollbackMerge => true,
        _ => false,
    }
}
fn is_request_urgent ( req : & RaftCmdRequest ) -> bool { if ! req . has_admin_request ( ) { return false ; } match req . get_admin_request ( ) . get_cmd_type ( ) { AdminCmdType :: Split | AdminCmdType :: BatchSplit | AdminCmdType :: ChangePeer | AdminCmdType :: ChangePeerV2 | AdminCmdType :: ComputeHash | AdminCmdType :: VerifyHash | AdminCmdType :: PrepareMerge | AdminCmdType :: CommitMerge | AdminCmdType :: RollbackMerge => true , _ => false , } }
We enable follower lazy commit to get a better performance.
We enable follower lazy commit to get a better performance .
req
&RaftCmdRequest