refact: remove assert and adjust log
This commit is contained in:
parent
f7d263862b
commit
fba45da225
|
@ -62,7 +62,7 @@ bool voteGrantedMajority(SVotesGranted *pVotesGranted) { return pVotesGranted->v
|
||||||
|
|
||||||
void voteGrantedVote(SVotesGranted *pVotesGranted, SyncRequestVoteReply *pMsg) {
|
void voteGrantedVote(SVotesGranted *pVotesGranted, SyncRequestVoteReply *pMsg) {
|
||||||
if (!pMsg->voteGranted) {
|
if (!pMsg->voteGranted) {
|
||||||
sNFatal(pVotesGranted->pSyncNode, " vote granted should be true");
|
sNFatal(pVotesGranted->pSyncNode, "vote granted should be true");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ void voteGrantedVote(SVotesGranted *pVotesGranted, SyncRequestVoteReply *pMsg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!syncUtilSameId(&pVotesGranted->pSyncNode->myRaftId, &pMsg->destId)) {
|
if (!syncUtilSameId(&pVotesGranted->pSyncNode->myRaftId, &pMsg->destId)) {
|
||||||
sNFatal(pVotesGranted->pSyncNode, " vote granted raftId not matched with msg");
|
sNFatal(pVotesGranted->pSyncNode, "vote granted raftId not matched with msg");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,8 +84,8 @@ void voteGrantedVote(SVotesGranted *pVotesGranted, SyncRequestVoteReply *pMsg) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((j == -1) || (j >= 0 && j < pVotesGranted->replicaNum)) {
|
if ((j == -1) || !(j >= 0 && j < pVotesGranted->replicaNum)) {
|
||||||
sNFatal(pVotesGranted->pSyncNode, " invalid msg srcId, index:%d", j);
|
sNFatal(pVotesGranted->pSyncNode, "invalid msg srcId, index:%d", j);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,8 +94,8 @@ void voteGrantedVote(SVotesGranted *pVotesGranted, SyncRequestVoteReply *pMsg) {
|
||||||
pVotesGranted->isGranted[j] = true;
|
pVotesGranted->isGranted[j] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pVotesGranted->votes <= pVotesGranted->replicaNum) {
|
if (pVotesGranted->votes > pVotesGranted->replicaNum) {
|
||||||
sNFatal(pVotesGranted->pSyncNode, " votes:%d not matched with replicaNum:%d", pVotesGranted->votes,
|
sNFatal(pVotesGranted->pSyncNode, "votes:%d not matched with replicaNum:%d", pVotesGranted->votes,
|
||||||
pVotesGranted->replicaNum);
|
pVotesGranted->replicaNum);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,4 @@
|
||||||
//#include <gtest/gtest.h>
|
//#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncRaftEntry.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
#include "trpc.h"
|
|
||||||
#include "syncTest.h"
|
#include "syncTest.h"
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "os.h"
|
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
#include "wal.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "os.h"
|
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
#include "wal.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
#include "wal.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,15 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncRaftEntry.h"
|
|
||||||
#include "syncRaftLog.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "syncTest.h"
|
#include "syncTest.h"
|
||||||
#include "syncUtil.h"
|
|
||||||
#include "wal.h"
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
void logTest() {
|
void logTest() {
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftLog.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
#include "tref.h"
|
|
||||||
#include "tskiplist.h"
|
|
||||||
#include "syncTest.h"
|
#include "syncTest.h"
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
|
|
|
@ -1,11 +1,3 @@
|
||||||
#include <gtest/gtest.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftLog.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
#include "syncTest.h"
|
#include "syncTest.h"
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
#include "syncEnv.h"
|
#include "syncTest.h"
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "ttime.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftLog.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "syncTest.h"
|
#include "syncTest.h"
|
||||||
#include "syncUtil.h"
|
|
||||||
#include "tskiplist.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
#include <gtest/gtest.h>
|
#include "syncTest.h"
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
#include "tdatablock.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
#include <gtest/gtest.h>
|
#include "syncTest.h"
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
@ -101,7 +95,7 @@ int main(int argc, char** argv) {
|
||||||
syncPingReply2RpcMsg(pSyncMsg, &rpcMsg);
|
syncPingReply2RpcMsg(pSyncMsg, &rpcMsg);
|
||||||
|
|
||||||
SEpSet epSet;
|
SEpSet epSet;
|
||||||
syncUtilnodeInfo2EpSet(&pSyncNode->myNodeInfo, &epSet);
|
syncUtilNodeInfo2EpSet(&pSyncNode->myNodeInfo, &epSet);
|
||||||
rpcMsg.info.noResp = 1;
|
rpcMsg.info.noResp = 1;
|
||||||
pSyncNode->syncSendMSg(&epSet, &rpcMsg);
|
pSyncNode->syncSendMSg(&epSet, &rpcMsg);
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
#include <gtest/gtest.h>
|
#include "syncTest.h"
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
#include "syncIndexMgr.h"
|
#include "syncTest.h"
|
||||||
//#include <gtest/gtest.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
#include "syncVoteMgr.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
#include <gtest/gtest.h>
|
#include "syncTest.h"
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
|
|
||||||
void print(SHashObj *pNextIndex) {
|
void print(SHashObj *pNextIndex) {
|
||||||
printf("----------------\n");
|
printf("----------------\n");
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
#include <gtest/gtest.h>
|
#include "syncTest.h"
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,13 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftLog.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "syncTest.h"
|
#include "syncTest.h"
|
||||||
#include "syncUtil.h"
|
|
||||||
#include "wal.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftLog.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
#include "wal.h"
|
|
||||||
#include "syncTest.h"
|
#include "syncTest.h"
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
|
|
|
@ -1,13 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftLog.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "syncTest.h"
|
#include "syncTest.h"
|
||||||
#include "syncUtil.h"
|
|
||||||
#include "wal.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
#include "syncRaftStore.h"
|
#include "syncRaftStore.h"
|
||||||
//#include <gtest/gtest.h>
|
#include "syncTest.h"
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftCfg.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
#include "syncRaftStore.h"
|
#include "syncTest.h"
|
||||||
//#include <gtest/gtest.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftCfg.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void usage(char* exe) {
|
void usage(char* exe) {
|
||||||
printf("Usage: %s host port \n", exe);
|
printf("Usage: %s host port \n", exe);
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
#include "syncRaftLog.h"
|
#include "syncRaftLog.h"
|
||||||
//#include <gtest/gtest.h>
|
#include "syncTest.h"
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
#include "wal.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,13 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftLog.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "syncTest.h"
|
#include "syncTest.h"
|
||||||
#include "syncUtil.h"
|
|
||||||
#include "wal.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
#include "syncRaftStore.h"
|
#include "syncRaftStore.h"
|
||||||
//#include <gtest/gtest.h>
|
#include "syncTest.h"
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "tref.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
#include "wal.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftLog.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
#include "wal.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "syncSnapshot.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "syncSnapshot.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,14 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncRaftEntry.h"
|
|
||||||
#include "syncRaftLog.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
#include "wal.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "os.h"
|
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftCfg.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
#include "wal.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
#include "syncTest.h"
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
#include "syncUtil.h"
|
#include "syncTest.h"
|
||||||
//#include <gtest/gtest.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -1,11 +1,3 @@
|
||||||
#include <gtest/gtest.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
#include "syncVoteMgr.h"
|
|
||||||
#include "syncTest.h"
|
#include "syncTest.h"
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
|
|
|
@ -1,14 +1,6 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "syncUtil.h"
|
|
||||||
#include "syncVoteMgr.h"
|
|
||||||
#include "syncTest.h"
|
#include "syncTest.h"
|
||||||
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
sDebug("--- sync log test: debug");
|
sDebug("--- sync log test: debug");
|
||||||
|
|
|
@ -1,15 +1,5 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include "syncEnv.h"
|
|
||||||
#include "syncIO.h"
|
|
||||||
#include "syncInt.h"
|
|
||||||
#include "syncMessage.h"
|
|
||||||
#include "syncRaftEntry.h"
|
|
||||||
#include "syncRaftLog.h"
|
|
||||||
#include "syncRaftStore.h"
|
|
||||||
#include "syncTest.h"
|
#include "syncTest.h"
|
||||||
#include "syncUtil.h"
|
|
||||||
#include "wal.h"
|
|
||||||
|
|
||||||
void logTest() {
|
void logTest() {
|
||||||
sTrace("--- sync log test: trace");
|
sTrace("--- sync log test: trace");
|
||||||
|
|
|
@ -22,8 +22,10 @@ extern "C" {
|
||||||
|
|
||||||
#include "syncInt.h"
|
#include "syncInt.h"
|
||||||
|
|
||||||
|
#include "tref.h"
|
||||||
#include "wal.h"
|
#include "wal.h"
|
||||||
|
|
||||||
|
#include "tref.h"
|
||||||
#include "syncEnv.h"
|
#include "syncEnv.h"
|
||||||
#include "syncIO.h"
|
#include "syncIO.h"
|
||||||
#include "syncIndexMgr.h"
|
#include "syncIndexMgr.h"
|
||||||
|
@ -38,6 +40,8 @@ extern "C" {
|
||||||
#include "syncUtil.h"
|
#include "syncUtil.h"
|
||||||
#include "syncVoteMgr.h"
|
#include "syncVoteMgr.h"
|
||||||
|
|
||||||
|
extern void addEpIntoEpSet(SEpSet* pEpSet, const char* fqdn, uint16_t port);
|
||||||
|
|
||||||
cJSON* syncEntry2Json(const SSyncRaftEntry* pEntry);
|
cJSON* syncEntry2Json(const SSyncRaftEntry* pEntry);
|
||||||
char* syncEntry2Str(const SSyncRaftEntry* pEntry);
|
char* syncEntry2Str(const SSyncRaftEntry* pEntry);
|
||||||
void syncEntryPrint(const SSyncRaftEntry* pObj);
|
void syncEntryPrint(const SSyncRaftEntry* pObj);
|
||||||
|
|
Loading…
Reference in New Issue