little fix
This commit is contained in:
parent
25120cede4
commit
145c43e346
|
@ -16,8 +16,9 @@
|
||||||
#include "vnd.h"
|
#include "vnd.h"
|
||||||
|
|
||||||
extern int32_t tsdbSyncRetention(STsdb *tsdb, int64_t now);
|
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 code;
|
||||||
int32_t lino;
|
int32_t lino;
|
||||||
|
|
||||||
|
@ -30,7 +31,8 @@ int32_t vnodeSyncRetention(SVnode *pVnode, int64_t now) {
|
||||||
// TSDB_CHECK_CODE(code, lino, _exit);
|
// TSDB_CHECK_CODE(code, lino, _exit);
|
||||||
tsem_post(&pVnode->canCommit);
|
tsem_post(&pVnode->canCommit);
|
||||||
} else {
|
} else {
|
||||||
code = tsdbSyncRetention(pVnode->pTsdb, now);
|
int64_t taskid;
|
||||||
|
code = tsdbAsyncRetention(pVnode->pTsdb, now, &taskid);
|
||||||
TSDB_CHECK_CODE(code, lino, _exit);
|
TSDB_CHECK_CODE(code, lino, _exit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -689,7 +689,7 @@ void vnodeUpdateMetaRsp(SVnode *pVnode, STableMetaRsp *pMetaRsp) {
|
||||||
pMetaRsp->precision = pVnode->config.tsdbCfg.precision;
|
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) {
|
static int32_t vnodeProcessTrimReq(SVnode *pVnode, int64_t ver, void *pReq, int32_t len, SRpcMsg *pRsp) {
|
||||||
int32_t code = 0;
|
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);
|
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:
|
_exit:
|
||||||
return code;
|
return code;
|
||||||
|
@ -728,7 +728,7 @@ static int32_t vnodeProcessDropTtlTbReq(SVnode *pVnode, int64_t ver, void *pReq,
|
||||||
tqUpdateTbUidList(pVnode->pTq, tbUids, false);
|
tqUpdateTbUidList(pVnode->pTq, tbUids, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
vnodeSyncRetention(pVnode, ttlReq.timestampSec);
|
vnodeDoRetention(pVnode, ttlReq.timestampSec);
|
||||||
|
|
||||||
end:
|
end:
|
||||||
taosArrayDestroy(tbUids);
|
taosArrayDestroy(tbUids);
|
||||||
|
|
Loading…
Reference in New Issue