fn increase_uncommitted_size(&mut self, ents: &[Entry]) -> bool {
        let s = ents
            .iter()
            .fold(0, |acc, entry| acc + entry.get_Data().len() as u64);
        if self.uncommitted_size > 0
            && s > 0
            && self.uncommitted_size + s > self.max_uncommitted_size
        {
            // If the uncommitted tail of the Raft log is empty, allow any size
            // proposal. Otherwise, limit the size of the uncommitted tail of the
            // log and drop any proposal that would push the size over the limit.
            // Note the added requirement s>0 which is used to make sure that
            // appending single empty entries to the log always succeeds, used both
            // for replicating a new leader's initial empty entry, and for
            // auto-leaving joint configurations.
            return false;
        }
        self.uncommitted_size += s;
        true
    }
// increaseUncommittedSize computes the size of the proposed entries and
// determines whether they would push leader over its maxUncommittedSize limit.
// If the new entries would exceed the limit, the method returns false. If not,
// the increase in uncommitted entry size is recorded and the method returns
// true.
//
// Empty payloads are never refused. This is used both for appending an empty
// entry at a new leader's term, as well as leaving a joint configuration.
increaseUncommittedSize computes the size of the proposed entries and
determines whether they would push leader over its maxUncommittedSize limit.
If the new entries would exceed the limit, the method returns false. If not,
the increase in uncommitted entry size is recorded and the method returns
true.

Empty payloads are never refused. This is used both for appending an empty
entry at a new leader's term, as well as leaving a joint configuration.
increaseUncommittedSize computes the size of the proposed entries and determines whether they would push leader over its maxUncommittedSize limit . If the new entries would exceed the limit the method returns false . If not the increase in uncommitted entry size is recorded and the method returns true . Empty payloads are never refused . This is used both for appending an empty entry at a new leader ' s term as well as leaving a joint configuration .
fn increase_uncommitted_size(&mut self, ents: &[Entry]) -> bool {
        let s = ents
            .iter()
            .fold(0, |acc, entry| acc + entry.get_Data().len() as u64);
        if self.uncommitted_size > 0
            && s > 0
            && self.uncommitted_size + s > self.max_uncommitted_size
        {
            // If the uncommitted tail of the Raft log is empty, allow any size
            // proposal. Otherwise, limit the size of the uncommitted tail of the
            // log and drop any proposal that would push the size over the limit.
            // Note the added requirement s>0 which is used to make sure that
            // appending single empty entries to the log always succeeds, used both
            // for replicating a new leader's initial empty entry, and for
            // auto-leaving joint configurations.
            return false;
        }
        self.uncommitted_size += s;
        true
    }
fn increase_uncommitted_size ( & mut self , ents : & [ Entry ] ) -> bool { let s = ents . iter ( ) . fold ( 0 , | acc , entry | acc + entry . get_Data ( ) . len ( ) as u64 ) ; if self . uncommitted_size > 0 && s > 0 && self . uncommitted_size + s > self . max_uncommitted_size { // If the uncommitted tail of the Raft log is empty, allow any size // proposal. Otherwise, limit the size of the uncommitted tail of the // log and drop any proposal that would push the size over the limit. // Note the added requirement s>0 which is used to make sure that // appending single empty entries to the log always succeeds, used both // for replicating a new leader's initial empty entry, and for // auto-leaving joint configurations. return false ; } self . uncommitted_size += s ; true }
increaseUncommittedSize computes the size of the proposed entries and
determines whether they would push leader over its maxUncommittedSize limit.
increaseUncommittedSize computes the size of the proposed entries and determines whether they would push leader over its maxUncommittedSize limit .
&mut self
ents
&[Entry]