refact: move sync test code to single lib
This commit is contained in:
parent
340bad7e99
commit
f2fd847414
|
@ -2223,10 +2223,6 @@ int32_t syncNodeOnClientRequest(SSyncNode* ths, SRpcMsg* pMsg, SyncIndex* pRetIn
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// del resp mgr, call FpCommitCb
|
// del resp mgr, call FpCommitCb
|
||||||
|
|
||||||
SRpcMsg rpcMsg = {0};
|
|
||||||
syncClientRequest2RpcMsg(pMsg, &rpcMsg);
|
|
||||||
|
|
||||||
SFsmCbMeta cbMeta = {
|
SFsmCbMeta cbMeta = {
|
||||||
.index = pEntry->index,
|
.index = pEntry->index,
|
||||||
.lastConfigIndex = SYNC_INDEX_INVALID,
|
.lastConfigIndex = SYNC_INDEX_INVALID,
|
||||||
|
@ -2238,9 +2234,7 @@ int32_t syncNodeOnClientRequest(SSyncNode* ths, SRpcMsg* pMsg, SyncIndex* pRetIn
|
||||||
.currentTerm = ths->pRaftStore->currentTerm,
|
.currentTerm = ths->pRaftStore->currentTerm,
|
||||||
.flag = 0,
|
.flag = 0,
|
||||||
};
|
};
|
||||||
|
ths->pFsm->FpCommitCb(ths->pFsm, pMsg, &cbMeta);
|
||||||
syncRespMgrGetAndDel(ths->pSyncRespMgr, cbMeta.seqNum, &rpcMsg.info);
|
|
||||||
ths->pFsm->FpCommitCb(ths->pFsm, &rpcMsg, &cbMeta);
|
|
||||||
|
|
||||||
if (h) {
|
if (h) {
|
||||||
taosLRUCacheRelease(ths->pLogStore->pCache, h, false);
|
taosLRUCacheRelease(ths->pLogStore->pCache, h, false);
|
||||||
|
|
|
@ -78,7 +78,7 @@ int32_t syncNodeReplicateOne(SSyncNode* pSyncNode, SRaftId* pDestId) {
|
||||||
|
|
||||||
pMsg = syncAppendEntriesBuild(pEntry->bytes, pSyncNode->vgId);
|
pMsg = syncAppendEntriesBuild(pEntry->bytes, pSyncNode->vgId);
|
||||||
ASSERT(pMsg != NULL);
|
ASSERT(pMsg != NULL);
|
||||||
memcpy(pMsg->data, pEntry->data, pEntry->bytes);
|
memcpy(pMsg->data, pEntry, pEntry->bytes);
|
||||||
syncEntryDestory(pEntry);
|
syncEntryDestory(pEntry);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -118,7 +118,7 @@ step7:
|
||||||
sql select count(*) from db.tb -x step7
|
sql select count(*) from db.tb -x step7
|
||||||
|
|
||||||
print select count(*) from db.tb ==> $data00 $lastRows
|
print select count(*) from db.tb ==> $data00 $lastRows
|
||||||
if $data00 <= $lastRows then
|
if $data00 < $lastRows then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue