Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
ecaea669
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看板
提交
ecaea669
编写于
6月 02, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: adjust some logs
上级
465ec500
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
21 addition
and
20 deletion
+21
-20
source/dnode/mgmt/mgmt_vnode/src/vmFile.c
source/dnode/mgmt/mgmt_vnode/src/vmFile.c
+1
-1
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
+2
-2
source/dnode/mgmt/mgmt_vnode/src/vmInt.c
source/dnode/mgmt/mgmt_vnode/src/vmInt.c
+2
-2
source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
+12
-11
source/dnode/mgmt/node_mgmt/src/dmMgmt.c
source/dnode/mgmt/node_mgmt/src/dmMgmt.c
+3
-3
source/dnode/mgmt/node_mgmt/src/dmTransport.c
source/dnode/mgmt/node_mgmt/src/dmTransport.c
+1
-1
未找到文件。
source/dnode/mgmt/mgmt_vnode/src/vmFile.c
浏览文件 @
ecaea669
...
...
@@ -31,7 +31,7 @@ SVnodeObj **vmGetVnodeListFromHash(SVnodeMgmt *pMgmt, int32_t *numOfVnodes) {
SVnodeObj
*
pVnode
=
*
ppVnode
;
if
(
pVnode
&&
num
<
size
)
{
int32_t
refCount
=
atomic_add_fetch_32
(
&
pVnode
->
refCount
,
1
);
dTrace
(
"vgId:%d, acquire vnode, refCount:%d"
,
pVnode
->
vgId
,
refCount
);
//
dTrace("vgId:%d, acquire vnode, refCount:%d", pVnode->vgId, refCount);
pVnodes
[
num
]
=
(
*
ppVnode
);
num
++
;
pIter
=
taosHashIterate
(
pMgmt
->
hash
,
pIter
);
...
...
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
浏览文件 @
ecaea669
...
...
@@ -192,7 +192,7 @@ int32_t vmProcessCreateVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) {
return
-
1
;
}
dDebug
(
"vgId:%d,
create vnode req is received
, tsma:%d standby:%d"
,
createReq
.
vgId
,
createReq
.
isTsma
,
dDebug
(
"vgId:%d,
start to create vnode
, tsma:%d standby:%d"
,
createReq
.
vgId
,
createReq
.
isTsma
,
createReq
.
standby
);
vmGenerateVnodeCfg
(
&
createReq
,
&
vnodeCfg
);
vmGenerateWrapperCfg
(
pMgmt
,
&
createReq
,
&
wrapperCfg
);
...
...
@@ -270,7 +270,7 @@ int32_t vmProcessDropVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) {
}
int32_t
vgId
=
dropReq
.
vgId
;
dDebug
(
"vgId:%d,
drop vnode req is received
"
,
vgId
);
dDebug
(
"vgId:%d,
start to drop vnode
"
,
vgId
);
SVnodeObj
*
pVnode
=
vmAcquireVnode
(
pMgmt
,
vgId
);
if
(
pVnode
==
NULL
)
{
...
...
source/dnode/mgmt/mgmt_vnode/src/vmInt.c
浏览文件 @
ecaea669
...
...
@@ -25,7 +25,7 @@ SVnodeObj *vmAcquireVnode(SVnodeMgmt *pMgmt, int32_t vgId) {
terrno
=
TSDB_CODE_VND_INVALID_VGROUP_ID
;
}
else
{
int32_t
refCount
=
atomic_add_fetch_32
(
&
pVnode
->
refCount
,
1
);
dTrace
(
"vgId:%d, acquire vnode, ref:%d"
,
pVnode
->
vgId
,
refCount
);
//
dTrace("vgId:%d, acquire vnode, ref:%d", pVnode->vgId, refCount);
}
taosThreadRwlockUnlock
(
&
pMgmt
->
lock
);
...
...
@@ -37,7 +37,7 @@ void vmReleaseVnode(SVnodeMgmt *pMgmt, SVnodeObj *pVnode) {
taosThreadRwlockRdlock
(
&
pMgmt
->
lock
);
int32_t
refCount
=
atomic_sub_fetch_32
(
&
pVnode
->
refCount
,
1
);
dTrace
(
"vgId:%d, release vnode, ref:%d"
,
pVnode
->
vgId
,
refCount
);
//
dTrace("vgId:%d, release vnode, ref:%d", pVnode->vgId, refCount);
taosThreadRwlockUnlock
(
&
pMgmt
->
lock
);
}
...
...
source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
浏览文件 @
ecaea669
...
...
@@ -243,33 +243,34 @@ static int32_t vmPutMsgToQueue(SVnodeMgmt *pMgmt, SRpcMsg *pMsg, EQueueType qtyp
SVnodeObj
*
pVnode
=
vmAcquireVnode
(
pMgmt
,
pHead
->
vgId
);
if
(
pVnode
==
NULL
)
{
dError
(
"vgId:%d, failed to put msg:%p into vnode queue since %s"
,
pHead
->
vgId
,
pMsg
,
terrstr
());
dError
(
"vgId:%d, failed to put msg:%p into vnode queue since %s, type:%s"
,
pHead
->
vgId
,
pMsg
,
terrstr
(),
TMSG_INFO
(
pMsg
->
msgType
));
return
terrno
!=
0
?
terrno
:
-
1
;
}
switch
(
qtype
)
{
case
QUERY_QUEUE
:
dTrace
(
"vgId:%d, msg:%p put into vnode-query queue
, type:%s"
,
pVnode
->
vgId
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
)
);
dTrace
(
"vgId:%d, msg:%p put into vnode-query queue
"
,
pVnode
->
vgId
,
pMsg
);
taosWriteQitem
(
pVnode
->
pQueryQ
,
pMsg
);
break
;
case
FETCH_QUEUE
:
dTrace
(
"vgId:%d, msg:%p put into vnode-fetch queue
, type:%s"
,
pVnode
->
vgId
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
)
);
dTrace
(
"vgId:%d, msg:%p put into vnode-fetch queue
"
,
pVnode
->
vgId
,
pMsg
);
taosWriteQitem
(
pVnode
->
pFetchQ
,
pMsg
);
break
;
case
WRITE_QUEUE
:
dTrace
(
"vgId:%d, msg:%p put into vnode-write queue
, type:%s"
,
pVnode
->
vgId
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
)
);
dTrace
(
"vgId:%d, msg:%p put into vnode-write queue
"
,
pVnode
->
vgId
,
pMsg
);
taosWriteQitem
(
pVnode
->
pWriteQ
,
pMsg
);
break
;
case
SYNC_QUEUE
:
dTrace
(
"vgId:%d, msg:%p put into vnode-sync queue
, type:%s"
,
pVnode
->
vgId
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
)
);
dTrace
(
"vgId:%d, msg:%p put into vnode-sync queue
"
,
pVnode
->
vgId
,
pMsg
);
taosWriteQitem
(
pVnode
->
pSyncQ
,
pMsg
);
break
;
case
MERGE_QUEUE
:
dTrace
(
"vgId:%d, msg:%p put into vnode-merge queue
, type:%s"
,
pVnode
->
vgId
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
)
);
dTrace
(
"vgId:%d, msg:%p put into vnode-merge queue
"
,
pVnode
->
vgId
,
pMsg
);
taosWriteQitem
(
pVnode
->
pMergeQ
,
pMsg
);
break
;
case
APPLY_QUEUE
:
dTrace
(
"vgId:%d, msg:%p put into vnode-apply queue
, type:%s"
,
pVnode
->
vgId
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
)
);
dTrace
(
"vgId:%d, msg:%p put into vnode-apply queue
"
,
pVnode
->
vgId
,
pMsg
);
taosWriteQitem
(
pVnode
->
pApplyQ
,
pMsg
);
break
;
default:
...
...
@@ -293,13 +294,13 @@ int32_t vmPutMsgToFetchQueue(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) { return vmPutMsg
int32_t
vmPutMsgToMergeQueue
(
SVnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
)
{
return
vmPutMsgToQueue
(
pMgmt
,
pMsg
,
MERGE_QUEUE
);
}
int32_t
vmPutMsgToMgmtQueue
(
SVnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
)
{
dTrace
(
"msg:%p, put into vnode-mgmt queue
, type:%s"
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
)
);
dTrace
(
"msg:%p, put into vnode-mgmt queue
"
,
pMsg
);
taosWriteQitem
(
pMgmt
->
mgmtWorker
.
queue
,
pMsg
);
return
0
;
}
int32_t
vmPutMsgToMonitorQueue
(
SVnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
)
{
dTrace
(
"msg:%p, put into vnode-monitor queue
, type:%s"
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
)
);
dTrace
(
"msg:%p, put into vnode-monitor queue
"
,
pMsg
);
taosWriteQitem
(
pMgmt
->
monitorWorker
.
queue
,
pMsg
);
return
0
;
}
...
...
@@ -309,11 +310,11 @@ int32_t vmPutRpcMsgToQueue(SVnodeMgmt *pMgmt, EQueueType qtype, SRpcMsg *pRpc) {
if
(
pMsg
==
NULL
)
return
-
1
;
SMsgHead
*
pHead
=
pRpc
->
pCont
;
dTrace
(
"vgId:%d, msg:%p is created, type:%s"
,
pHead
->
vgId
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
));
pHead
->
contLen
=
htonl
(
pHead
->
contLen
);
pHead
->
vgId
=
htonl
(
pHead
->
vgId
);
memcpy
(
pMsg
,
pRpc
,
sizeof
(
SRpcMsg
));
dTrace
(
"msg:%p, is created and will put into vnode queue"
,
pMsg
);
return
vmPutMsgToQueue
(
pMgmt
,
pMsg
,
qtype
);
}
...
...
source/dnode/mgmt/node_mgmt/src/dmMgmt.c
浏览文件 @
ecaea669
...
...
@@ -229,7 +229,7 @@ SMgmtWrapper *dmAcquireWrapper(SDnode *pDnode, EDndNodeType ntype) {
taosThreadRwlockRdlock
(
&
pWrapper
->
lock
);
if
(
pWrapper
->
deployed
)
{
int32_t
refCount
=
atomic_add_fetch_32
(
&
pWrapper
->
refCount
,
1
);
dTrace
(
"node:%s, is acquired, ref:%d"
,
pWrapper
->
name
,
refCount
);
//
dTrace("node:%s, is acquired, ref:%d", pWrapper->name, refCount);
}
else
{
terrno
=
TSDB_CODE_NODE_NOT_DEPLOYED
;
pRetWrapper
=
NULL
;
...
...
@@ -245,7 +245,7 @@ int32_t dmMarkWrapper(SMgmtWrapper *pWrapper) {
taosThreadRwlockRdlock
(
&
pWrapper
->
lock
);
if
(
pWrapper
->
deployed
||
(
InParentProc
(
pWrapper
)
&&
pWrapper
->
required
))
{
int32_t
refCount
=
atomic_add_fetch_32
(
&
pWrapper
->
refCount
,
1
);
dTrace
(
"node:%s, is marked, ref:%d"
,
pWrapper
->
name
,
refCount
);
//
dTrace("node:%s, is marked, ref:%d", pWrapper->name, refCount);
}
else
{
terrno
=
TSDB_CODE_NODE_NOT_DEPLOYED
;
code
=
-
1
;
...
...
@@ -261,7 +261,7 @@ void dmReleaseWrapper(SMgmtWrapper *pWrapper) {
taosThreadRwlockRdlock
(
&
pWrapper
->
lock
);
int32_t
refCount
=
atomic_sub_fetch_32
(
&
pWrapper
->
refCount
,
1
);
taosThreadRwlockUnlock
(
&
pWrapper
->
lock
);
dTrace
(
"node:%s, is released, ref:%d"
,
pWrapper
->
name
,
refCount
);
//
dTrace("node:%s, is released, ref:%d", pWrapper->name, refCount);
}
static
void
dmGetServerStartupStatus
(
SDnode
*
pDnode
,
SServerStatusRsp
*
pStatus
)
{
...
...
source/dnode/mgmt/node_mgmt/src/dmTransport.c
浏览文件 @
ecaea669
...
...
@@ -117,7 +117,7 @@ static void dmProcessRpcMsg(SDnode *pDnode, SRpcMsg *pRpc, SEpSet *pEpSet) {
if
(
pMsg
==
NULL
)
{
goto
_OVER
;
}
dTrace
(
"msg:%p, is created
"
,
pMsg
);
dTrace
(
"msg:%p, is created
, type:%s"
,
pMsg
,
TMSG_INFO
(
pRpc
->
msgType
)
);
if
(
dmBuildNodeMsg
(
pMsg
,
pRpc
)
!=
0
)
{
goto
_OVER
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录