refactor(sync): add resp ttl clean

This commit is contained in:
Minghao Li 2022-07-12 20:23:31 +08:00
parent 473e134f31
commit e91ca30b19
2 changed files with 6 additions and 1 deletions

View File

@ -146,6 +146,8 @@ void syncRespCleanByTTL(SSyncRespMgr *pObj, int64_t ttl) {
cbMeta.currentTerm = pSyncNode->pRaftStore->currentTerm;
cbMeta.flag = 0;
pStub->rpcMsg.pCont = NULL;
pStub->rpcMsg.contLen = 0;
pSyncNode->pFsm->FpCommitCb(pSyncNode->pFsm, &(pStub->rpcMsg), cbMeta);
}

View File

@ -20,7 +20,10 @@
int32_t syncNodeTimerRoutine(SSyncNode* ths) {
syncNodeEventLog(ths, "timer routines ... ");
if (ths->vgId != 1) {
syncRespClean(ths->pSyncRespMgr);
}
return 0;
}