Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
5596deea
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
Star
22018
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看板
未验证
提交
5596deea
编写于
1月 12, 2023
作者:
S
Shengliang Guan
提交者:
GitHub
1月 12, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #19508 from taosdata/fix/TD-21663-2
fix: coverity issues
上级
71df37a8
e6b40314
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
19 addition
and
16 deletion
+19
-16
include/util/tdef.h
include/util/tdef.h
+1
-1
source/dnode/mgmt/mgmt_vnode/src/vmInt.c
source/dnode/mgmt/mgmt_vnode/src/vmInt.c
+5
-6
source/dnode/mnode/impl/src/mndSma.c
source/dnode/mnode/impl/src/mndSma.c
+7
-5
source/dnode/mnode/impl/src/mndSync.c
source/dnode/mnode/impl/src/mndSync.c
+2
-0
source/dnode/mnode/impl/src/mndVgroup.c
source/dnode/mnode/impl/src/mndVgroup.c
+2
-2
source/libs/sync/src/syncMain.c
source/libs/sync/src/syncMain.c
+1
-2
source/util/src/tworker.c
source/util/src/tworker.c
+1
-0
未找到文件。
include/util/tdef.h
浏览文件 @
5596deea
...
...
@@ -499,7 +499,7 @@ enum {
#define DEFAULT_PAGESIZE 4096
#define VNODE_TIMEOUT_SEC 60
#define MNODE_TIMEOUT_SEC
1
0
#define MNODE_TIMEOUT_SEC
6
0
#ifdef __cplusplus
}
...
...
source/dnode/mgmt/mgmt_vnode/src/vmInt.c
浏览文件 @
5596deea
...
...
@@ -343,13 +343,12 @@ static void vmCheckSyncTimeout(SVnodeMgmt *pMgmt) {
int32_t
numOfVnodes
=
0
;
SVnodeObj
**
ppVnodes
=
vmGetVnodeListFromHash
(
pMgmt
,
&
numOfVnodes
);
for
(
int32_t
i
=
0
;
i
<
numOfVnodes
;
++
i
)
{
SVnodeObj
*
pVnode
=
ppVnodes
[
i
];
vnodeSyncCheckTimeout
(
pVnode
->
pImpl
);
vmReleaseVnode
(
pMgmt
,
pVnode
);
}
if
(
ppVnodes
!=
NULL
)
{
for
(
int32_t
i
=
0
;
i
<
numOfVnodes
;
++
i
)
{
SVnodeObj
*
pVnode
=
ppVnodes
[
i
];
vnodeSyncCheckTimeout
(
pVnode
->
pImpl
);
vmReleaseVnode
(
pMgmt
,
pVnode
);
}
taosMemoryFree
(
ppVnodes
);
}
}
...
...
source/dnode/mnode/impl/src/mndSma.c
浏览文件 @
5596deea
...
...
@@ -202,11 +202,13 @@ static SSdbRow *mndSmaActionDecode(SSdbRaw *pRaw) {
_OVER:
if
(
terrno
!=
0
)
{
mError
(
"sma:%s, failed to decode from raw:%p since %s"
,
pSma
==
NULL
?
"null"
:
pSma
->
name
,
pRaw
,
terrstr
());
taosMemoryFreeClear
(
pSma
->
expr
);
taosMemoryFreeClear
(
pSma
->
tagsFilter
);
taosMemoryFreeClear
(
pSma
->
sql
);
taosMemoryFreeClear
(
pSma
->
ast
);
if
(
pSma
!=
NULL
)
{
mError
(
"sma:%s, failed to decode from raw:%p since %s"
,
pSma
->
name
,
pRaw
,
terrstr
());
taosMemoryFreeClear
(
pSma
->
expr
);
taosMemoryFreeClear
(
pSma
->
tagsFilter
);
taosMemoryFreeClear
(
pSma
->
sql
);
taosMemoryFreeClear
(
pSma
->
ast
);
}
taosMemoryFreeClear
(
pRow
);
return
NULL
;
}
...
...
source/dnode/mnode/impl/src/mndSync.c
浏览文件 @
5596deea
...
...
@@ -271,9 +271,11 @@ SSyncFSM *mndSyncMakeFsm(SMnode *pMnode) {
int32_t
mndInitSync
(
SMnode
*
pMnode
)
{
SSyncMgmt
*
pMgmt
=
&
pMnode
->
syncMgmt
;
taosThreadMutexInit
(
&
pMgmt
->
lock
,
NULL
);
taosThreadMutexLock
(
&
pMgmt
->
lock
);
pMgmt
->
transId
=
0
;
pMgmt
->
transSec
=
0
;
pMgmt
->
transSeq
=
0
;
taosThreadMutexUnlock
(
&
pMgmt
->
lock
);
SSyncInfo
syncInfo
=
{
.
snapshotStrategy
=
SYNC_STRATEGY_STANDARD_SNAPSHOT
,
...
...
source/dnode/mnode/impl/src/mndVgroup.c
浏览文件 @
5596deea
...
...
@@ -1441,10 +1441,10 @@ static int32_t mndRedistributeVgroup(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb,
{
SSdbRaw
*
pRaw
=
mndVgroupActionEncode
(
&
newVg
);
if
(
pRaw
==
NULL
)
return
-
1
;
if
(
pRaw
==
NULL
)
goto
_OVER
;
if
(
mndTransAppendCommitlog
(
pTrans
,
pRaw
)
!=
0
)
{
sdbFreeRaw
(
pRaw
);
return
-
1
;
goto
_OVER
;
}
(
void
)
sdbSetRawStatus
(
pRaw
,
SDB_STATUS_READY
);
}
...
...
source/libs/sync/src/syncMain.c
浏览文件 @
5596deea
...
...
@@ -1703,8 +1703,7 @@ void syncNodeDoConfigChange(SSyncNode* pSyncNode, SSyncCfg* pNewConfig, SyncInde
_END:
// log end config change
sNInfo
(
pSyncNode
,
"end do config change, from %d to %d"
,
pSyncNode
->
vgId
,
oldConfig
.
replicaNum
,
pNewConfig
->
replicaNum
);
sNInfo
(
pSyncNode
,
"end do config change, from %d to %d"
,
oldConfig
.
replicaNum
,
pNewConfig
->
replicaNum
);
}
// raft state change --------------
...
...
source/util/src/tworker.c
浏览文件 @
5596deea
...
...
@@ -227,6 +227,7 @@ STaosQueue *tAutoQWorkerAllocQueue(SAutoQWorkerPool *pool, void *ahandle, FItem
uError
(
"worker:%s:%d failed to create"
,
pool
->
name
,
curWorkerNum
);
taosMemoryFree
(
worker
);
taosCloseQueue
(
queue
);
taosThreadMutexUnlock
(
&
pool
->
mutex
);
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
return
NULL
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录