fix: be conservative on commit progress in appendEntries
This commit is contained in:
parent
6fc47beb71
commit
724cf98dc3
|
@ -211,7 +211,7 @@ _SEND_RESPONSE:
|
||||||
if (accepted && matched) {
|
if (accepted && matched) {
|
||||||
pReply->success = true;
|
pReply->success = true;
|
||||||
// update commit index only after matching
|
// update commit index only after matching
|
||||||
(void)syncNodeUpdateCommitIndex(ths, pMsg->commitIndex);
|
(void)syncNodeUpdateCommitIndex(ths, TMIN(pMsg->commitIndex, pEntry->index));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ack, i.e. send response
|
// ack, i.e. send response
|
||||||
|
|
Loading…
Reference in New Issue