Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f5cf2ca3
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
f5cf2ca3
编写于
2月 25, 2022
作者:
wafwerar
提交者:
GitHub
2月 25, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #10415 from taosdata/fix/ZhiqiangWang/TD-13062-file-system-judge-pointer-err
[TD-13062]<fix>: file system judge pointer error.
上级
b0dd5b23
dbb8cfce
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
15 addition
and
15 deletion
+15
-15
source/dnode/vnode/src/tsdb/tsdbFile.c
source/dnode/vnode/src/tsdb/tsdbFile.c
+2
-2
source/libs/index/src/index_fst_counting_writer.c
source/libs/index/src/index_fst_counting_writer.c
+1
-1
source/libs/tdb/src/db/tdbEnv.c
source/libs/tdb/src/db/tdbEnv.c
+1
-1
source/libs/tdb/src/db/tdbPgFile.c
source/libs/tdb/src/db/tdbPgFile.c
+1
-1
source/libs/transport/test/rserver.c
source/libs/transport/test/rserver.c
+1
-1
source/libs/wal/src/walSeek.c
source/libs/wal/src/walSeek.c
+4
-4
source/libs/wal/src/walWrite.c
source/libs/wal/src/walWrite.c
+3
-3
source/util/src/tlog.c
source/util/src/tlog.c
+2
-2
未找到文件。
source/dnode/vnode/src/tsdb/tsdbFile.c
浏览文件 @
f5cf2ca3
...
...
@@ -356,7 +356,7 @@ int tsdbCreateDFile(STsdb *pRepo, SDFile *pDFile, bool updateHeader) {
ASSERT
(
pDFile
->
info
.
size
==
0
&&
pDFile
->
info
.
magic
==
TSDB_FILE_INIT_MAGIC
);
pDFile
->
pFile
=
taosOpenFile
(
TSDB_FILE_FULL_NAME
(
pDFile
),
TD_FILE_CTEATE
|
TD_FILE_WRITE
|
TD_FILE_TRUNC
);
if
(
pDFile
->
pFile
<
0
)
{
if
(
pDFile
->
pFile
==
NULL
)
{
if
(
errno
==
ENOENT
)
{
// Try to create directory recursively
char
*
s
=
strdup
(
TSDB_FILE_REL_NAME
(
pDFile
));
...
...
@@ -367,7 +367,7 @@ int tsdbCreateDFile(STsdb *pRepo, SDFile *pDFile, bool updateHeader) {
tfree
(
s
);
pDFile
->
pFile
=
taosOpenFile
(
TSDB_FILE_FULL_NAME
(
pDFile
),
TD_FILE_CTEATE
|
TD_FILE_WRITE
|
TD_FILE_TRUNC
);
if
(
pDFile
->
pFile
<
0
)
{
if
(
pDFile
->
pFile
==
NULL
)
{
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
return
-
1
;
}
...
...
source/libs/index/src/index_fst_counting_writer.c
浏览文件 @
f5cf2ca3
...
...
@@ -105,7 +105,7 @@ WriterCtx* writerCtxCreate(WriterType type, const char* path, bool readOnly, int
#endif
}
memcpy
(
ctx
->
file
.
buf
,
path
,
strlen
(
path
));
if
(
ctx
->
file
.
pFile
<
0
)
{
if
(
ctx
->
file
.
pFile
==
NULL
)
{
indexError
(
"failed to open file, error %d"
,
errno
);
goto
END
;
}
...
...
source/libs/tdb/src/db/tdbEnv.c
浏览文件 @
f5cf2ca3
...
...
@@ -140,7 +140,7 @@ static int tdbEnvDestroy(TENV *pEnv) {
int
tdbEnvBeginTxn
(
TENV
*
pEnv
)
{
pEnv
->
jpFile
=
taosOpenFile
(
pEnv
->
jname
,
TD_FILE_CTEATE
|
TD_FILE_WRITE
|
TD_FILE_READ
);
if
(
pEnv
->
jpFile
<
0
)
{
if
(
pEnv
->
jpFile
==
NULL
)
{
return
-
1
;
}
...
...
source/libs/tdb/src/db/tdbPgFile.c
浏览文件 @
f5cf2ca3
...
...
@@ -95,7 +95,7 @@ int pgFileOpen(SPgFile **ppPgFile, const char *fname, TENV *pEnv) {
int
pgFileClose
(
SPgFile
*
pPgFile
)
{
if
(
pPgFile
)
{
if
(
pPgFile
->
pFile
>=
0
)
{
if
(
pPgFile
->
pFile
!=
NULL
)
{
taosCloseFile
(
&
pPgFile
->
pFile
);
}
...
...
source/libs/transport/test/rserver.c
浏览文件 @
f5cf2ca3
...
...
@@ -43,7 +43,7 @@ void processShellMsg() {
for
(
int
i
=
0
;
i
<
numOfMsgs
;
++
i
)
{
taosGetQitem
(
qall
,
(
void
**
)
&
pRpcMsg
);
if
(
pDataFile
>=
0
)
{
if
(
pDataFile
!=
NULL
)
{
if
(
taosWriteFile
(
pDataFile
,
pRpcMsg
->
pCont
,
pRpcMsg
->
contLen
)
<
0
)
{
tInfo
(
"failed to write data file, reason:%s"
,
strerror
(
errno
));
}
...
...
source/libs/wal/src/walSeek.c
浏览文件 @
f5cf2ca3
...
...
@@ -58,13 +58,13 @@ int walSetWrite(SWal* pWal) {
char
fnameStr
[
WAL_FILE_LEN
];
walBuildIdxName
(
pWal
,
fileFirstVer
,
fnameStr
);
pIdxTFile
=
taosOpenFile
(
fnameStr
,
TD_FILE_CTEATE
|
TD_FILE_WRITE
|
TD_FILE_APPEND
);
if
(
pIdxTFile
<
0
)
{
if
(
pIdxTFile
==
NULL
)
{
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
return
-
1
;
}
walBuildLogName
(
pWal
,
fileFirstVer
,
fnameStr
);
pLogTFile
=
taosOpenFile
(
fnameStr
,
TD_FILE_CTEATE
|
TD_FILE_WRITE
|
TD_FILE_APPEND
);
if
(
pLogTFile
<
0
)
{
if
(
pLogTFile
==
NULL
)
{
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
return
-
1
;
}
...
...
@@ -104,14 +104,14 @@ int walChangeWrite(SWal* pWal, int64_t ver) {
int64_t
fileFirstVer
=
pFileInfo
->
firstVer
;
walBuildIdxName
(
pWal
,
fileFirstVer
,
fnameStr
);
pIdxTFile
=
taosOpenFile
(
fnameStr
,
TD_FILE_CTEATE
|
TD_FILE_WRITE
|
TD_FILE_APPEND
);
if
(
pIdxTFile
<
0
)
{
if
(
pIdxTFile
==
NULL
)
{
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
pWal
->
pWriteIdxTFile
=
NULL
;
return
-
1
;
}
walBuildLogName
(
pWal
,
fileFirstVer
,
fnameStr
);
pLogTFile
=
taosOpenFile
(
fnameStr
,
TD_FILE_CTEATE
|
TD_FILE_WRITE
|
TD_FILE_APPEND
);
if
(
pLogTFile
<
0
)
{
if
(
pLogTFile
==
NULL
)
{
taosCloseFile
(
&
pIdxTFile
);
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
pWal
->
pWriteLogTFile
=
NULL
;
...
...
source/libs/wal/src/walWrite.c
浏览文件 @
f5cf2ca3
...
...
@@ -89,7 +89,7 @@ int32_t walRollback(SWal *pWal, int64_t ver) {
walBuildLogName
(
pWal
,
walGetCurFileFirstVer
(
pWal
),
fnameStr
);
TdFilePtr
pLogTFile
=
taosOpenFile
(
fnameStr
,
TD_FILE_WRITE
|
TD_FILE_READ
);
if
(
pLogTFile
<
0
)
{
if
(
pLogTFile
==
NULL
)
{
// TODO
pthread_mutex_unlock
(
&
pWal
->
mutex
);
return
-
1
;
...
...
@@ -221,13 +221,13 @@ int walRoll(SWal *pWal) {
char
fnameStr
[
WAL_FILE_LEN
];
walBuildIdxName
(
pWal
,
newFileFirstVersion
,
fnameStr
);
pIdxTFile
=
taosOpenFile
(
fnameStr
,
TD_FILE_CTEATE
|
TD_FILE_WRITE
|
TD_FILE_APPEND
);
if
(
pIdxTFile
<
0
)
{
if
(
pIdxTFile
==
NULL
)
{
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
return
-
1
;
}
walBuildLogName
(
pWal
,
newFileFirstVersion
,
fnameStr
);
pLogTFile
=
taosOpenFile
(
fnameStr
,
TD_FILE_CTEATE
|
TD_FILE_WRITE
|
TD_FILE_APPEND
);
if
(
pLogTFile
<
0
)
{
if
(
pLogTFile
==
NULL
)
{
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
return
-
1
;
}
...
...
source/util/src/tlog.c
浏览文件 @
f5cf2ca3
...
...
@@ -416,7 +416,7 @@ void taosPrintLog(const char *flags, int32_t dflag, const char *format, ...) {
buffer
[
len
++
]
=
'\n'
;
buffer
[
len
]
=
0
;
if
((
dflag
&
DEBUG_FILE
)
&&
tsLogObj
.
logHandle
&&
tsLogObj
.
logHandle
->
pFile
>=
0
)
{
if
((
dflag
&
DEBUG_FILE
)
&&
tsLogObj
.
logHandle
&&
tsLogObj
.
logHandle
->
pFile
!=
NULL
)
{
if
(
tsAsyncLog
)
{
taosPushLogBuffer
(
tsLogObj
.
logHandle
,
buffer
,
len
);
}
else
{
...
...
@@ -483,7 +483,7 @@ void taosPrintLongString(const char *flags, int32_t dflag, const char *format, .
buffer
[
len
++
]
=
'\n'
;
buffer
[
len
]
=
0
;
if
((
dflag
&
DEBUG_FILE
)
&&
tsLogObj
.
logHandle
&&
tsLogObj
.
logHandle
->
pFile
>=
0
)
{
if
((
dflag
&
DEBUG_FILE
)
&&
tsLogObj
.
logHandle
&&
tsLogObj
.
logHandle
->
pFile
!=
NULL
)
{
if
(
tsAsyncLog
)
{
taosPushLogBuffer
(
tsLogObj
.
logHandle
,
buffer
,
len
);
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录