MIT6.824-2017-Chinese icon indicating copy to clipboard operation
MIT6.824-2017-Chinese copied to clipboard

代码问题

Open themoonstone opened this issue 5 years ago • 0 comments

` if args.LeaderCommit > rf.commitIndex {

	if args.LeaderCommit < rf.getLastLogIndex() {

		rf.commitIndex = rf.getLastLogIndex()

	} else {

		rf.commitIndex = args.LeaderCommit

	}

}

` 你好,请教一下,这段代码和论文里描述不一样啊,论文里接收者实现说的是“如果 leaderCommit > commitIndex,令 commitIndex 等于 leaderCommit 和 新日志条目索引值中较小的一个”,这里是不是取反了?

themoonstone avatar Mar 01 '19 14:03 themoonstone