提交 7e2dee8a 编写于 作者: C cadem

filter voter when agree upon

上级 f22d279f
......@@ -75,12 +75,14 @@ bool syncNodeAgreedUpon(SSyncNode* pNode, SyncIndex index) {
SSyncIndexMgr* pMatches = pNode->pMatchIndex;
ASSERT(pNode->replicaNum == pMatches->replicaNum);
for (int i = 0; i < pNode->replicaNum; i++) {
for (int i = 0; i < pNode->totalReplicaNum; i++) {
if(pNode->raftCfg.cfg.nodeInfo[i].nodeRole == TAOS_SYNC_ROLE_VOTER){
SyncIndex matchIndex = pMatches->index[i];
if (matchIndex >= index) {
count++;
}
}
}
return count >= pNode->quorum;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册