提交 724cf98d 编写于 作者: B Benguang Zhao

fix: be conservative on commit progress in appendEntries

上级 6fc47beb
......@@ -211,7 +211,7 @@ _SEND_RESPONSE:
if (accepted && matched) {
pReply->success = true;
// update commit index only after matching
(void)syncNodeUpdateCommitIndex(ths, pMsg->commitIndex);
(void)syncNodeUpdateCommitIndex(ths, TMIN(pMsg->commitIndex, pEntry->index));
}
// ack, i.e. send response
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册