little fix

This commit is contained in:
Hongze Cheng 2023-07-14 16:38:35 +08:00
parent 25120cede4
commit 145c43e346
2 changed files with 7 additions and 5 deletions

View File

@ -16,8 +16,9 @@
#include "vnd.h"
extern int32_t tsdbSyncRetention(STsdb *tsdb, int64_t now);
extern int32_t tsdbAsyncRetention(STsdb *tsdb, int64_t now, int64_t *taskid);
int32_t vnodeSyncRetention(SVnode *pVnode, int64_t now) {
int32_t vnodeDoRetention(SVnode *pVnode, int64_t now) {
int32_t code;
int32_t lino;
@ -30,7 +31,8 @@ int32_t vnodeSyncRetention(SVnode *pVnode, int64_t now) {
// TSDB_CHECK_CODE(code, lino, _exit);
tsem_post(&pVnode->canCommit);
} else {
code = tsdbSyncRetention(pVnode->pTsdb, now);
int64_t taskid;
code = tsdbAsyncRetention(pVnode->pTsdb, now, &taskid);
TSDB_CHECK_CODE(code, lino, _exit);
}

View File

@ -689,7 +689,7 @@ void vnodeUpdateMetaRsp(SVnode *pVnode, STableMetaRsp *pMetaRsp) {
pMetaRsp->precision = pVnode->config.tsdbCfg.precision;
}
extern int32_t vnodeSyncRetention(SVnode *pVnode, int64_t now);
extern int32_t vnodeDoRetention(SVnode *pVnode, int64_t now);
static int32_t vnodeProcessTrimReq(SVnode *pVnode, int64_t ver, void *pReq, int32_t len, SRpcMsg *pRsp) {
int32_t code = 0;
@ -703,7 +703,7 @@ static int32_t vnodeProcessTrimReq(SVnode *pVnode, int64_t ver, void *pReq, int3
vInfo("vgId:%d, trim vnode request will be processed, time:%d", pVnode->config.vgId, trimReq.timestamp);
code = vnodeSyncRetention(pVnode, trimReq.timestamp);
code = vnodeDoRetention(pVnode, trimReq.timestamp);
_exit:
return code;
@ -728,7 +728,7 @@ static int32_t vnodeProcessDropTtlTbReq(SVnode *pVnode, int64_t ver, void *pReq,
tqUpdateTbUidList(pVnode->pTq, tbUids, false);
}
vnodeSyncRetention(pVnode, ttlReq.timestampSec);
vnodeDoRetention(pVnode, ttlReq.timestampSec);
end:
taosArrayDestroy(tbUids);