filter voter when agree upon
This commit is contained in:
parent
f22d279f5f
commit
7e2dee8a0f
|
@ -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++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue