This commit is contained in:
Shengliang Guan 2020-11-03 20:27:07 +08:00
parent a82ac7de39
commit 38c28f1cb6
2 changed files with 6 additions and 6 deletions

View File

@ -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); \

View File

@ -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;