fix: catalog subtask cache hit issue

This commit is contained in:
dapan1121 2024-08-05 19:10:55 +08:00
parent d6f8d79223
commit 0e24ce2a4c
1 changed files with 10 additions and 5 deletions

View File

@ -2783,11 +2783,13 @@ int32_t ctgLaunchGetTbMetaTask(SCtgTask* pTask) {
pMsgCtx->pBatchs = pJob->pBatchs;
}
if (!pTask->subTask) {
CTG_ERR_RET(ctgGetTbMetaFromCache(pCtg, (SCtgTbMetaCtx*)pTask->taskCtx, (STableMeta**)&pTask->res));
if (pTask->res) {
CTG_ERR_RET(ctgHandleTaskEnd(pTask, 0));
return TSDB_CODE_SUCCESS;
}
}
SCtgTbMetaCtx* pCtx = (SCtgTbMetaCtx*)pTask->taskCtx;
SCtgTaskReq tReq;
@ -2879,7 +2881,10 @@ int32_t ctgLaunchGetDbVgTask(SCtgTask* pTask) {
pMsgCtx->pBatchs = pJob->pBatchs;
}
if (!pTask->subTask) {
CTG_ERR_RET(ctgAcquireVgInfoFromCache(pCtg, pCtx->dbFName, &dbCache));
}
if (NULL != dbCache) {
CTG_ERR_JRET(ctgGenerateVgList(pCtg, dbCache->vgCache.vgInfo->vgHash, (SArray**)&pTask->res));