braft icon indicating copy to clipboard operation
braft copied to clipboard

fix

Open dragonylffly opened this issue 4 years ago • 2 comments

dragonylffly avatar Aug 13 '21 03:08 dragonylffly

@PFZheng

dragonylffly avatar Aug 13 '21 03:08 dragonylffly

@chenzhangyi As the codes as well as comments in Lines 86-88 ballot_box.cpp, the elements before last_committed_index are removed. So it just needs to find the largest last_committed_index, use reverse search to avoid calling bl.granted() and updating last_committed_index multiple times

dragonylffly avatar Aug 13 '21 08:08 dragonylffly