|
@@ -641,7 +641,9 @@ impl Raft {
|
|
|
let mut rf = rf.lock();
|
|
let mut rf = rf.lock();
|
|
|
|
|
|
|
|
let step = &mut rf.current_step[peer_index];
|
|
let step = &mut rf.current_step[peer_index];
|
|
|
- *step += 1;
|
|
|
|
|
|
|
+ if *step < 5 {
|
|
|
|
|
+ *step += 1;
|
|
|
|
|
+ }
|
|
|
let diff = (1 << 8) << *step;
|
|
let diff = (1 << 8) << *step;
|
|
|
|
|
|
|
|
let next_index = &mut rf.next_index[peer_index];
|
|
let next_index = &mut rf.next_index[peer_index];
|