leader can not commit log which produce by other term
2225377fjs opened this issue · 0 comments
2225377fjs commented
while self.__raftCommitIndex < self.__getCurrentLogIndex():
nextCommitIndex = self.__raftCommitIndex + 1
count = 1
for node in self.__otherNodes:
if self.__raftMatchIndex[node] >= nextCommitIndex:
count += 1
if count > (len(self.__otherNodes) + 1) / 2:
self.__raftCommitIndex = nextCommitIndex
else:
break
this not fullfill