提交 167d6cb7 编写于 作者: H Hongze Cheng

fix #813

上级 d15d7688
......@@ -466,8 +466,6 @@ static int vnodeLoadNeededBlockData(SMeterObj *pObj, SImportHandle *pHandle, int
SCompBlock *pBlock = pHandle->pBlocks + blockId;
*code = TSDB_CODE_SUCCESS;
assert(pBlock->sversion == pObj->sversion);
SVnodeObj *pVnode = vnodeList + pObj->vnode;
int dfd = pBlock->last ? pVnode->lfd : pVnode->dfd;
......@@ -989,6 +987,13 @@ static int vnodeMergeDataIntoFile(SImportInfo *pImport, const char *payload, int
}
}
int aslot = MIN(blockIter.slot, importHandle.compInfo.numOfBlocks - 1);
int64_t sversion = importHandle.pBlocks[aslot].sversion;
if (sversion != pObj->sversion) {
code = TSDB_CODE_OTHERS;
goto _error_merge;
}
// Open the new .t file if not opened yet.
if (pVnode->nfd <= 0) {
if (vnodeOpenTempFilesForImport(&importHandle, pObj, fid) < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册