File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -1766,10 +1766,10 @@ impl<T: Storage> Raft<T> {
1766
1766
match pr. state {
1767
1767
ProgressState :: Probe => pr. become_replicate ( ) ,
1768
1768
ProgressState :: Snapshot => {
1769
- if pr. maybe_snapshot_abort ( ) {
1769
+ if pr. is_snapshot_caught_up ( ) {
1770
1770
debug ! (
1771
1771
self . r. logger,
1772
- "snapshot aborted , resumed sending replication messages to {from}" ,
1772
+ "snapshot caught up , resumed sending replication messages to {from}" ,
1773
1773
from = m. from;
1774
1774
"progress" => ?pr,
1775
1775
) ;
Original file line number Diff line number Diff line change @@ -125,10 +125,9 @@ impl Progress {
125
125
self . pending_snapshot = 0 ;
126
126
}
127
127
128
- /// Unsets pendingSnapshot if Match is equal or higher than
129
- /// the pendingSnapshot
128
+ /// Returns true if Match is equal or higher than the pendingSnapshot.
130
129
#[ inline]
131
- pub fn maybe_snapshot_abort ( & self ) -> bool {
130
+ pub fn is_snapshot_caught_up ( & self ) -> bool {
132
131
self . state == ProgressState :: Snapshot && self . matched >= self . pending_snapshot
133
132
}
134
133
You can’t perform that action at this time.
0 commit comments