提交 38c28f1c 编写于 作者: S Shengliang Guan

TD-1912

上级 a82ac7de
......@@ -20,10 +20,10 @@
extern "C" {
#endif
#define treadfile(fd, buf, count) read(fd, buf, count)
#define twritefile(fd, buf, count) write(fd, buf, count)
#define tlseekfile(fd, offset, whence) lseek(fd, offset, whence)
#define tclosefile(fd) \
#define tread(fd, buf, count) read(fd, buf, count)
#define twrite(fd, buf, count) write(fd, buf, count)
#define tlseek(fd, offset, whence) lseek(fd, offset, whence)
#define tclose(fd) \
{ \
if (FD_VALID(x)) { \
close(x); \
......
......@@ -37,7 +37,7 @@ int32_t walRenew(void *handle) {
pthread_mutex_lock(&pWal->mutex);
if (pWal->fd >= 0) {
close(pWal->fd);
tclose(pWal->fd);
wDebug("vgId:%d, file:%s, it is closed", pWal->vgId, pWal->name);
}
......@@ -310,7 +310,7 @@ static int32_t walRestoreWalFile(SWal *pWal, void *pVnode, FWalWrite writeFp, ch
(*writeFp)(pVnode, pHead, TAOS_QTYPE_WAL);
}
close(fd);
tclose(fd);
tfree(buffer);
return code;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册