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