未验证 提交 b09bb40e 编写于 作者: X Xiaoyu Wang 提交者: GitHub

Merge pull request #20242 from taosdata/fix/auto_retention

fix: auto retention
...@@ -599,16 +599,10 @@ static int32_t vnodeProcessTrimReq(SVnode *pVnode, int64_t version, void *pReq, ...@@ -599,16 +599,10 @@ static int32_t vnodeProcessTrimReq(SVnode *pVnode, int64_t version, void *pReq,
vInfo("vgId:%d, trim vnode request will be processed, time:%d", pVnode->config.vgId, trimReq.timestamp); vInfo("vgId:%d, trim vnode request will be processed, time:%d", pVnode->config.vgId, trimReq.timestamp);
// process // process
#if 0
code = tsdbDoRetention(pVnode->pTsdb, trimReq.timestamp);
if (code) goto _exit;
code = smaDoRetention(pVnode->pSma, trimReq.timestamp);
if (code) goto _exit;
#else
vnodeAsyncRentention(pVnode, trimReq.timestamp); vnodeAsyncRentention(pVnode, trimReq.timestamp);
#endif tsem_wait(&pVnode->canCommit);
tsem_post(&pVnode->canCommit);
_exit: _exit:
return code; return code;
...@@ -633,18 +627,7 @@ static int32_t vnodeProcessDropTtlTbReq(SVnode *pVnode, int64_t version, void *p ...@@ -633,18 +627,7 @@ static int32_t vnodeProcessDropTtlTbReq(SVnode *pVnode, int64_t version, void *p
tqUpdateTbUidList(pVnode->pTq, tbUids, false); tqUpdateTbUidList(pVnode->pTq, tbUids, false);
} }
#if 0
// process
ret = tsdbDoRetention(pVnode->pTsdb, ttlReq.timestamp);
if (ret) goto end;
ret = smaDoRetention(pVnode->pSma, ttlReq.timestamp);
if (ret) goto end;
#else
vnodeAsyncRentention(pVnode, ttlReq.timestamp); vnodeAsyncRentention(pVnode, ttlReq.timestamp);
tsem_wait(&pVnode->canCommit);
tsem_post(&pVnode->canCommit);
#endif
end: end:
taosArrayDestroy(tbUids); taosArrayDestroy(tbUids);
...@@ -1647,7 +1630,8 @@ static int32_t vnodeProcessCompactVnodeReq(SVnode *pVnode, int64_t version, void ...@@ -1647,7 +1630,8 @@ static int32_t vnodeProcessCompactVnodeReq(SVnode *pVnode, int64_t version, void
return vnodeProcessCompactVnodeReqImpl(pVnode, version, pReq, len, pRsp); return vnodeProcessCompactVnodeReqImpl(pVnode, version, pReq, len, pRsp);
} }
#ifndef TD_ENTERPRISE #ifndef TD_ENTERPRISE
int32_t vnodeProcessCompactVnodeReqImpl(SVnode *pVnode, int64_t version, void *pReq, int32_t len, SRpcMsg *pRsp) { return 0; } int32_t vnodeProcessCompactVnodeReqImpl(SVnode *pVnode, int64_t version, void *pReq, int32_t len, SRpcMsg *pRsp) {
return 0;
}
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册