TD-1912
This commit is contained in:
parent
a82ac7de39
commit
38c28f1cb6
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue