fn maybe_renew_leader_lease(&mut self, ts: Timespec) {
        // A nonleader peer should never has leader lease.
        if !self.is_leader() {
            return;
        }
        if self.last_committed_split_idx > self.get_store().applied_index() {
            // A splitting leader should not renew its lease.
            // Because we split regions asynchronous, the leader may read stale results
            // if splitting runs slow on the leader.
            debug!("{} prevents renew lease while splitting", self.tag);
            return;
        }
        self.leader_lease.renew(ts);
    }
/// Try to renew leader lease.
Try to renew leader lease.
Try to renew leader lease .
fn maybe_renew_leader_lease(&mut self, ts: Timespec) {
        // A nonleader peer should never has leader lease.
        if !self.is_leader() {
            return;
        }
        if self.last_committed_split_idx > self.get_store().applied_index() {
            // A splitting leader should not renew its lease.
            // Because we split regions asynchronous, the leader may read stale results
            // if splitting runs slow on the leader.
            debug!("{} prevents renew lease while splitting", self.tag);
            return;
        }
        self.leader_lease.renew(ts);
    }
fn maybe_renew_leader_lease ( & mut self , ts : Timespec ) { // A nonleader peer should never has leader lease. if ! self . is_leader ( ) { return ; } if self . last_committed_split_idx > self . get_store ( ) . applied_index ( ) { // A splitting leader should not renew its lease. // Because we split regions asynchronous, the leader may read stale results // if splitting runs slow on the leader. debug ! ( " " self tag ) ; return ; } self . leader_lease . renew ( ts ) ; }
Try to renew leader lease.
Try to renew leader lease .
&mut self
ts
Timespec