refactor(sync): make leader life longer

This commit is contained in:
Minghao Li 2022-08-05 20:51:29 +08:00
parent 3cbaaa5a8c
commit 7d50c26207
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ void syncMaybeAdvanceCommitIndex(SSyncNode* pSyncNode) {
ASSERT(pEntry != NULL); ASSERT(pEntry != NULL);
// cannot commit, even if quorum agree. need check term! // cannot commit, even if quorum agree. need check term!
if (pEntry->term == pSyncNode->pRaftStore->currentTerm) { if (pEntry->term <= pSyncNode->pRaftStore->currentTerm) {
// update commit index // update commit index
newCommitIndex = index; newCommitIndex = index;