coreos/etcd — pull request #1203 by xiangli-cmu (2014-09-29 21:16:01+00:00)
Title: raft: commitIndex=min(leaderCommit, index of last new entry)

According raft paper:
commitIndex=min(leaderCommit, index of last new entry)

We do not strictly follow the paper. We compare min(leaderCommit, index of last new entry) with current commit index before the set to avoid commit index decrease.