baidu/braft

BallotBox中的commit机制在成员变更期间疑似有bug

cangfengzhs opened this issue · 0 comments

假设我从Joint阶段推进到Stable阶段
old_conf{A, B, C}
new_conf{D, E, F}

stable conf log 的Index=7

此时ABC三个node的lastIndex=5,并且leader获知了这一信息,BallotBox分别进行了commitAt(firstIndex, 5, A | B | C)
但是DEF三个node的lastIndex=10, 并且leader同样进行了commitAt(firstIndex, 10, D | E | F)

根据BallotBox中commit_at的逻辑,lastCommitIndex会被推进到10,因为Index=10的这个ballot中只有{D, E, F},但是Index=7这个stable conf log并没有被commit。old_conf并没有完成成员变更