未验证 提交 d3a53f17 编写于 作者: X Xiaoyu Wang 提交者: GitHub

Merge pull request #21073 from taosdata/fix/filter-votor-when-agree-upon

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