From df417c7f505b14eb73303d40f402ec3b4fdf9040 Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Tue, 28 Jun 2022 14:48:40 +0800 Subject: [PATCH] fix: not restore rsma if qtaskinfo file not exist --- source/dnode/vnode/src/sma/smaRollup.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/dnode/vnode/src/sma/smaRollup.c b/source/dnode/vnode/src/sma/smaRollup.c index f68fc4f30c..34c3ef8fca 100644 --- a/source/dnode/vnode/src/sma/smaRollup.c +++ b/source/dnode/vnode/src/sma/smaRollup.c @@ -749,9 +749,17 @@ int32_t tdProcessRSmaRestoreImpl(SSma *pSma) { if (tdInitTFile(&tFile, pVnode->pTfs, qTaskInfoFName) < 0) { goto _err; } + + if(!taosCheckExistFile(TD_TFILE_FULL_NAME(&tFile))) { + metaReaderClear(&mr); + taosArrayDestroy(suidList); + return TSDB_CODE_SUCCESS; + } + if (tdOpenTFile(&tFile, TD_FILE_READ) < 0) { goto _err; } + SRSmaQTaskInfoIter fIter = {0}; if (tdRSmaQTaskInfoIterInit(&fIter, &tFile) < 0) { goto _err; -- GitLab