提交 f5a6108c 编写于 作者: S Shengliang Guan

fix: minor changes

上级 4a90f84e
......@@ -650,6 +650,9 @@ int32_t sdbStopWrite(SSdb *pSdb, SSdbIter *pIter, bool isApply, int64_t index, i
goto _OVER;
}
taosCloseFile(&pIter->file);
pIter->file = NULL;
char datafile[PATH_MAX] = {0};
snprintf(datafile, sizeof(datafile), "%s%ssdb.data", pSdb->currDir, TD_DIRSEP);
if (taosRenameFile(pIter->name, datafile) != 0) {
......@@ -677,8 +680,10 @@ int32_t sdbStopWrite(SSdb *pSdb, SSdbIter *pIter, bool isApply, int64_t index, i
code = 0;
_OVER:
if (pIter->file != NULL) {
taosCloseFile(&pIter->file);
pIter->file = NULL;
}
sdbCloseIter(pIter);
return code;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册