提交 74384547 编写于 作者: zhangbiyun's avatar zhangbiyun

Failed to start TDengine server service.(vnode tsdb data file has wrong size ,...

Failed to start TDengine server service.(vnode tsdb data file has wrong size , report to upper layer to fix it) #13529
上级 98cd494f
...@@ -257,11 +257,11 @@ static FORCE_INLINE int tsdbAppendDFile(SDFile* pDFile, void* buf, int64_t nbyte ...@@ -257,11 +257,11 @@ static FORCE_INLINE int tsdbAppendDFile(SDFile* pDFile, void* buf, int64_t nbyte
return -1; return -1;
} }
//bug fix. To avoid data corruption, close the data file in advance. //bug fix. To avoid data corruption,
//ASSERT(pDFile->info.size == toffset); //the end offset of current file should be checked with file size,
//if not equal, known as file corrupted and return error.
if (pDFile->info.size != toffset) { if (pDFile->info.size != toffset) {
tsdbCloseDFile(pDFile); terrno = TSDB_CODE_TDB_FILE_CORRUPTED;
terrno = TAOS_SYSTEM_ERROR(errno);
return -1; return -1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册