Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
adb33546
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
adb33546
编写于
11月 05, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: coverity issues
上级
a83c69b8
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
32 addition
and
29 deletion
+32
-29
source/dnode/mgmt/mgmt_snode/src/smWorker.c
source/dnode/mgmt/mgmt_snode/src/smWorker.c
+3
-0
source/dnode/mnode/impl/src/mndSync.c
source/dnode/mnode/impl/src/mndSync.c
+2
-0
source/dnode/mnode/impl/src/mndTrans.c
source/dnode/mnode/impl/src/mndTrans.c
+1
-1
source/dnode/mnode/impl/src/mndVgroup.c
source/dnode/mnode/impl/src/mndVgroup.c
+4
-4
source/libs/sync/src/syncMain.c
source/libs/sync/src/syncMain.c
+10
-12
source/libs/sync/src/syncRespMgr.c
source/libs/sync/src/syncRespMgr.c
+9
-9
source/util/src/tworker.c
source/util/src/tworker.c
+3
-3
未找到文件。
source/dnode/mgmt/mgmt_snode/src/smWorker.c
浏览文件 @
adb33546
...
...
@@ -140,6 +140,9 @@ int32_t smPutMsgToQueue(SSnodeMgmt *pMgmt, EQueueType qtype, SRpcMsg *pRpc) {
if
(
pSnode
==
NULL
)
{
dError
(
"snode: msg:%p failed to put into vnode queue since %s, type:%s qtype:%d"
,
pMsg
,
terrstr
(),
TMSG_INFO
(
pMsg
->
msgType
),
qtype
);
taosFreeQitem
(
pMsg
);
rpcFreeCont
(
pRpc
->
pCont
);
pRpc
->
pCont
=
NULL
;
return
-
1
;
}
...
...
source/dnode/mnode/impl/src/mndSync.c
浏览文件 @
adb33546
...
...
@@ -282,6 +282,8 @@ int32_t mndSyncPropose(SMnode *pMnode, SSdbRaw *pRaw, int32_t transId) {
pMgmt
->
errCode
=
0
;
SRpcMsg
req
=
{.
msgType
=
TDMT_MND_APPLY_MSG
,
.
contLen
=
sdbGetRawTotalSize
(
pRaw
)};
if
(
req
.
contLen
<=
0
)
return
-
1
;
req
.
pCont
=
rpcMallocCont
(
req
.
contLen
);
if
(
req
.
pCont
==
NULL
)
return
-
1
;
memcpy
(
req
.
pCont
,
pRaw
,
req
.
contLen
);
...
...
source/dnode/mnode/impl/src/mndTrans.c
浏览文件 @
adb33546
...
...
@@ -375,7 +375,7 @@ static SSdbRow *mndTransActionDecode(SSdbRaw *pRaw) {
if
(
taosArrayPush
(
pTrans
->
undoActions
,
&
action
)
==
NULL
)
goto
_OVER
;
action
.
pCont
=
NULL
;
}
else
{
if
(
taosArrayPush
(
pTrans
->
re
doActions
,
&
action
)
==
NULL
)
goto
_OVER
;
if
(
taosArrayPush
(
pTrans
->
un
doActions
,
&
action
)
==
NULL
)
goto
_OVER
;
}
}
...
...
source/dnode/mnode/impl/src/mndVgroup.c
浏览文件 @
adb33546
...
...
@@ -325,10 +325,10 @@ static void *mndBuildAlterVnodeConfigReq(SMnode *pMnode, SDbObj *pDb, SVgObj *pV
static
void
*
mndBuildAlterVnodeReplicaReq
(
SMnode
*
pMnode
,
SDbObj
*
pDb
,
SVgObj
*
pVgroup
,
int32_t
dnodeId
,
int32_t
*
pContLen
)
{
SAlterVnodeReplicaReq
alterReq
=
{
alterReq
.
vgId
=
pVgroup
->
vgId
,
alterReq
.
strict
=
pDb
->
cfg
.
strict
,
alterReq
.
replica
=
pVgroup
->
replica
,
alterReq
.
selfIndex
=
-
1
,
.
vgId
=
pVgroup
->
vgId
,
.
strict
=
pDb
->
cfg
.
strict
,
.
replica
=
pVgroup
->
replica
,
.
selfIndex
=
-
1
,
};
for
(
int32_t
v
=
0
;
v
<
pVgroup
->
replica
;
++
v
)
{
...
...
source/libs/sync/src/syncMain.c
浏览文件 @
adb33546
...
...
@@ -768,7 +768,7 @@ char* sync2SimpleStr(int64_t rid) {
sTrace
(
"syncSetRpc get pSyncNode is NULL, rid:%"
PRId64
,
rid
);
return
NULL
;
}
ASSERT
(
rid
==
pSyncNode
->
rid
);
char
*
s
=
syncNode2SimpleStr
(
pSyncNode
);
syncNodeRelease
(
pSyncNode
);
...
...
@@ -778,11 +778,9 @@ char* sync2SimpleStr(int64_t rid) {
int32_t
syncPropose
(
int64_t
rid
,
SRpcMsg
*
pMsg
,
bool
isWeak
)
{
SSyncNode
*
pSyncNode
=
syncNodeAcquire
(
rid
);
if
(
pSyncNode
==
NULL
)
{
syncNodeRelease
(
pSyncNode
);
terrno
=
TSDB_CODE_SYN_INTERNAL_ERROR
;
return
-
1
;
}
ASSERT
(
rid
==
pSyncNode
->
rid
);
int32_t
ret
=
syncNodePropose
(
pSyncNode
,
pMsg
,
isWeak
);
syncNodeRelease
(
pSyncNode
);
...
...
@@ -3108,15 +3106,15 @@ int32_t syncDoLeaderTransfer(SSyncNode* ths, SRpcMsg* pRpcMsg, SSyncRaftEntry* p
if
(
ths
->
pFsm
->
FpLeaderTransferCb
!=
NULL
)
{
SFsmCbMeta
cbMeta
=
{
cbMeta
.
code
=
0
,
cbMeta
.
currentTerm
=
ths
->
pRaftStore
->
currentTerm
,
cbMeta
.
flag
=
0
,
cbMeta
.
index
=
pEntry
->
index
,
cbMeta
.
lastConfigIndex
=
syncNodeGetSnapshotConfigIndex
(
ths
,
pEntry
->
index
),
cbMeta
.
isWeak
=
pEntry
->
isWeak
,
cbMeta
.
seqNum
=
pEntry
->
seqNum
,
cbMeta
.
state
=
ths
->
state
,
cbMeta
.
term
=
pEntry
->
term
,
.
code
=
0
,
.
currentTerm
=
ths
->
pRaftStore
->
currentTerm
,
.
flag
=
0
,
.
index
=
pEntry
->
index
,
.
lastConfigIndex
=
syncNodeGetSnapshotConfigIndex
(
ths
,
pEntry
->
index
),
.
isWeak
=
pEntry
->
isWeak
,
.
seqNum
=
pEntry
->
seqNum
,
.
state
=
ths
->
state
,
.
term
=
pEntry
->
term
,
};
ths
->
pFsm
->
FpLeaderTransferCb
(
ths
->
pFsm
,
pRpcMsg
,
&
cbMeta
);
}
...
...
source/libs/sync/src/syncRespMgr.c
浏览文件 @
adb33546
...
...
@@ -146,15 +146,15 @@ void syncRespCleanByTTL(SSyncRespMgr *pObj, int64_t ttl, bool rsp) {
cnt
++
;
SFsmCbMeta
cbMeta
=
{
cbMeta
.
index
=
SYNC_INDEX_INVALID
,
cbMeta
.
lastConfigIndex
=
SYNC_INDEX_INVALID
,
cbMeta
.
isWeak
=
false
,
cbMeta
.
code
=
TSDB_CODE_SYN_TIMEOUT
,
cbMeta
.
state
=
pSyncNode
->
state
,
cbMeta
.
seqNum
=
*
pSeqNum
,
cbMeta
.
term
=
SYNC_TERM_INVALID
,
cbMeta
.
currentTerm
=
pSyncNode
->
pRaftStore
->
currentTerm
,
cbMeta
.
flag
=
0
,
.
index
=
SYNC_INDEX_INVALID
,
.
lastConfigIndex
=
SYNC_INDEX_INVALID
,
.
isWeak
=
false
,
.
code
=
TSDB_CODE_SYN_TIMEOUT
,
.
state
=
pSyncNode
->
state
,
.
seqNum
=
*
pSeqNum
,
.
term
=
SYNC_TERM_INVALID
,
.
currentTerm
=
pSyncNode
->
pRaftStore
->
currentTerm
,
.
flag
=
0
,
};
pStub
->
rpcMsg
.
pCont
=
NULL
;
...
...
source/util/src/tworker.c
浏览文件 @
adb33546
...
...
@@ -246,9 +246,6 @@ STaosQueue *tWWorkerAllocQueue(SWWorkerPool *pool, void *ahandle, FItems fp) {
pool
->
nextId
=
(
pool
->
nextId
+
1
)
%
pool
->
max
;
}
while
(
worker
->
pid
<=
0
)
taosMsleep
(
10
);
queue
->
threadId
=
worker
->
pid
;
uInfo
(
"worker:%s, queue:%p is allocated, ahandle:%p thread:%08"
PRId64
,
pool
->
name
,
queue
,
ahandle
,
queue
->
threadId
);
code
=
0
;
_OVER:
...
...
@@ -260,6 +257,9 @@ _OVER:
if
(
worker
->
qall
!=
NULL
)
taosFreeQall
(
worker
->
qall
);
return
NULL
;
}
else
{
while
(
worker
->
pid
<=
0
)
taosMsleep
(
10
);
queue
->
threadId
=
worker
->
pid
;
uInfo
(
"worker:%s, queue:%p is allocated, ahandle:%p thread:%08"
PRId64
,
pool
->
name
,
queue
,
ahandle
,
queue
->
threadId
);
return
queue
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录