Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e5abe59b
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e5abe59b
编写于
9月 28, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: coverity issues
上级
6c19c062
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
15 addition
and
6 deletion
+15
-6
source/dnode/mgmt/mgmt_vnode/src/vmFile.c
source/dnode/mgmt/mgmt_vnode/src/vmFile.c
+1
-0
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
+1
-1
source/dnode/mgmt/mgmt_vnode/src/vmInt.c
source/dnode/mgmt/mgmt_vnode/src/vmInt.c
+9
-3
source/dnode/mnode/sdb/src/sdbFile.c
source/dnode/mnode/sdb/src/sdbFile.c
+4
-2
未找到文件。
source/dnode/mgmt/mgmt_vnode/src/vmFile.c
浏览文件 @
e5abe59b
...
@@ -135,6 +135,7 @@ _OVER:
...
@@ -135,6 +135,7 @@ _OVER:
if
(
content
!=
NULL
)
taosMemoryFree
(
content
);
if
(
content
!=
NULL
)
taosMemoryFree
(
content
);
if
(
root
!=
NULL
)
cJSON_Delete
(
root
);
if
(
root
!=
NULL
)
cJSON_Delete
(
root
);
if
(
pFile
!=
NULL
)
taosCloseFile
(
&
pFile
);
if
(
pFile
!=
NULL
)
taosCloseFile
(
&
pFile
);
if
(
*
ppCfgs
==
NULL
&&
pCfgs
!=
NULL
)
taosMemoryFree
(
pCfgs
);
terrno
=
code
;
terrno
=
code
;
return
code
;
return
code
;
...
...
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
浏览文件 @
e5abe59b
...
@@ -175,7 +175,7 @@ static void vmGenerateVnodeCfg(SCreateVnodeReq *pCreate, SVnodeCfg *pCfg) {
...
@@ -175,7 +175,7 @@ static void vmGenerateVnodeCfg(SCreateVnodeReq *pCreate, SVnodeCfg *pCfg) {
pCfg
->
hashSuffix
=
pCreate
->
hashSuffix
;
pCfg
->
hashSuffix
=
pCreate
->
hashSuffix
;
pCfg
->
tsdbPageSize
=
pCreate
->
tsdbPageSize
*
1024
;
pCfg
->
tsdbPageSize
=
pCreate
->
tsdbPageSize
*
1024
;
pCfg
->
standby
=
pCfg
->
standby
;
pCfg
->
standby
=
0
;
pCfg
->
syncCfg
.
myIndex
=
pCreate
->
selfIndex
;
pCfg
->
syncCfg
.
myIndex
=
pCreate
->
selfIndex
;
pCfg
->
syncCfg
.
replicaNum
=
pCreate
->
replica
;
pCfg
->
syncCfg
.
replicaNum
=
pCreate
->
replica
;
memset
(
&
pCfg
->
syncCfg
.
nodeInfo
,
0
,
sizeof
(
pCfg
->
syncCfg
.
nodeInfo
));
memset
(
&
pCfg
->
syncCfg
.
nodeInfo
,
0
,
sizeof
(
pCfg
->
syncCfg
.
nodeInfo
));
...
...
source/dnode/mgmt/mgmt_vnode/src/vmInt.c
浏览文件 @
e5abe59b
...
@@ -58,11 +58,14 @@ int32_t vmOpenVnode(SVnodeMgmt *pMgmt, SWrapperCfg *pCfg, SVnode *pImpl) {
...
@@ -58,11 +58,14 @@ int32_t vmOpenVnode(SVnodeMgmt *pMgmt, SWrapperCfg *pCfg, SVnode *pImpl) {
if
(
pVnode
->
path
==
NULL
)
{
if
(
pVnode
->
path
==
NULL
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
taosMemoryFree
(
pVnode
);
return
-
1
;
return
-
1
;
}
}
if
(
vmAllocQueue
(
pMgmt
,
pVnode
)
!=
0
)
{
if
(
vmAllocQueue
(
pMgmt
,
pVnode
)
!=
0
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
taosMemoryFree
(
pVnode
->
path
);
taosMemoryFree
(
pVnode
);
return
-
1
;
return
-
1
;
}
}
...
@@ -221,6 +224,7 @@ static void vmCloseVnodes(SVnodeMgmt *pMgmt) {
...
@@ -221,6 +224,7 @@ static void vmCloseVnodes(SVnodeMgmt *pMgmt) {
SVnodeObj
**
ppVnodes
=
vmGetVnodeListFromHash
(
pMgmt
,
&
numOfVnodes
);
SVnodeObj
**
ppVnodes
=
vmGetVnodeListFromHash
(
pMgmt
,
&
numOfVnodes
);
for
(
int32_t
i
=
0
;
i
<
numOfVnodes
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
numOfVnodes
;
++
i
)
{
if
(
ppVnodes
==
NULL
||
ppVnodes
[
i
]
==
NULL
)
continue
;
vmCloseVnode
(
pMgmt
,
ppVnodes
[
i
]);
vmCloseVnode
(
pMgmt
,
ppVnodes
[
i
]);
}
}
...
@@ -380,7 +384,9 @@ static int32_t vmStartVnodes(SVnodeMgmt *pMgmt) {
...
@@ -380,7 +384,9 @@ static int32_t vmStartVnodes(SVnodeMgmt *pMgmt) {
for
(
int32_t
v
=
0
;
v
<
numOfVnodes
;
++
v
)
{
for
(
int32_t
v
=
0
;
v
<
numOfVnodes
;
++
v
)
{
int32_t
t
=
v
%
threadNum
;
int32_t
t
=
v
%
threadNum
;
SVnodeThread
*
pThread
=
&
threads
[
t
];
SVnodeThread
*
pThread
=
&
threads
[
t
];
pThread
->
ppVnodes
[
pThread
->
vnodeNum
++
]
=
ppVnodes
[
v
];
if
(
pThread
->
ppVnodes
!=
NULL
)
{
pThread
->
ppVnodes
[
pThread
->
vnodeNum
++
]
=
ppVnodes
[
v
];
}
}
}
pMgmt
->
state
.
openVnodes
=
0
;
pMgmt
->
state
.
openVnodes
=
0
;
...
@@ -411,8 +417,8 @@ static int32_t vmStartVnodes(SVnodeMgmt *pMgmt) {
...
@@ -411,8 +417,8 @@ static int32_t vmStartVnodes(SVnodeMgmt *pMgmt) {
taosMemoryFree
(
threads
);
taosMemoryFree
(
threads
);
for
(
int32_t
i
=
0
;
i
<
numOfVnodes
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
numOfVnodes
;
++
i
)
{
SVnodeObj
*
pVnode
=
ppVnodes
[
i
]
;
if
(
ppVnodes
==
NULL
||
ppVnodes
[
i
]
==
NULL
)
continue
;
vmReleaseVnode
(
pMgmt
,
p
Vnode
);
vmReleaseVnode
(
pMgmt
,
p
pVnodes
[
i
]
);
}
}
if
(
ppVnodes
!=
NULL
)
{
if
(
ppVnodes
!=
NULL
)
{
...
...
source/dnode/mnode/sdb/src/sdbFile.c
浏览文件 @
e5abe59b
...
@@ -514,7 +514,7 @@ static void sdbCloseIter(SSdbIter *pIter) {
...
@@ -514,7 +514,7 @@ static void sdbCloseIter(SSdbIter *pIter) {
}
}
if
(
pIter
->
name
!=
NULL
)
{
if
(
pIter
->
name
!=
NULL
)
{
taosRemoveFile
(
pIter
->
name
);
(
void
)
taosRemoveFile
(
pIter
->
name
);
taosMemoryFree
(
pIter
->
name
);
taosMemoryFree
(
pIter
->
name
);
pIter
->
name
=
NULL
;
pIter
->
name
=
NULL
;
}
}
...
@@ -606,6 +606,7 @@ int32_t sdbStartWrite(SSdb *pSdb, SSdbIter **ppIter) {
...
@@ -606,6 +606,7 @@ int32_t sdbStartWrite(SSdb *pSdb, SSdbIter **ppIter) {
if
(
pIter
->
file
==
NULL
)
{
if
(
pIter
->
file
==
NULL
)
{
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
mError
(
"failed to open %s since %s"
,
pIter
->
name
,
terrstr
());
mError
(
"failed to open %s since %s"
,
pIter
->
name
,
terrstr
());
sdbCloseIter
(
pIter
);
return
-
1
;
return
-
1
;
}
}
...
@@ -636,9 +637,9 @@ int32_t sdbStopWrite(SSdb *pSdb, SSdbIter *pIter, bool isApply, int64_t index, i
...
@@ -636,9 +637,9 @@ int32_t sdbStopWrite(SSdb *pSdb, SSdbIter *pIter, bool isApply, int64_t index, i
return
-
1
;
return
-
1
;
}
}
sdbCloseIter
(
pIter
);
if
(
sdbReadFile
(
pSdb
)
!=
0
)
{
if
(
sdbReadFile
(
pSdb
)
!=
0
)
{
mError
(
"sdbiter:%p, failed to read from %s since %s"
,
pIter
,
datafile
,
terrstr
());
mError
(
"sdbiter:%p, failed to read from %s since %s"
,
pIter
,
datafile
,
terrstr
());
sdbCloseIter
(
pIter
);
return
-
1
;
return
-
1
;
}
}
...
@@ -656,6 +657,7 @@ int32_t sdbStopWrite(SSdb *pSdb, SSdbIter *pIter, bool isApply, int64_t index, i
...
@@ -656,6 +657,7 @@ int32_t sdbStopWrite(SSdb *pSdb, SSdbIter *pIter, bool isApply, int64_t index, i
}
}
mInfo
(
"sdbiter:%p, success applyed to sdb"
,
pIter
);
mInfo
(
"sdbiter:%p, success applyed to sdb"
,
pIter
);
sdbCloseIter
(
pIter
);
return
0
;
return
0
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录