提交 f2fd8474 编写于 作者: S Shengliang Guan

refact: move sync test code to single lib

上级 340bad7e
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册