Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
2a62d568
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看板
提交
2a62d568
编写于
3月 18, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
shm
上级
1c05650c
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
14 addition
and
14 deletion
+14
-14
source/dnode/mgmt/container/src/dndMonitor.c
source/dnode/mgmt/container/src/dndMonitor.c
+3
-3
source/dnode/mgmt/dnode/src/dmMsg.c
source/dnode/mgmt/dnode/src/dmMsg.c
+1
-1
source/dnode/mgmt/mnode/inc/mm.h
source/dnode/mgmt/mnode/inc/mm.h
+1
-1
source/dnode/mgmt/mnode/src/mmInt.c
source/dnode/mgmt/mnode/src/mmInt.c
+2
-2
source/dnode/mgmt/vnode/inc/vm.h
source/dnode/mgmt/vnode/inc/vm.h
+3
-4
source/dnode/mgmt/vnode/inc/vmInt.h
source/dnode/mgmt/vnode/inc/vmInt.h
+1
-0
source/dnode/mgmt/vnode/src/vmInt.c
source/dnode/mgmt/vnode/src/vmInt.c
+3
-3
未找到文件。
source/dnode/mgmt/container/src/dndMonitor.c
浏览文件 @
2a62d568
...
...
@@ -22,7 +22,7 @@ static int32_t dndGetMonitorDiskInfo(SDnode *pDnode, SMonDiskInfo *pInfo) {
tstrncpy
(
pInfo
->
tempdir
.
name
,
tsTempDir
,
sizeof
(
pInfo
->
tempdir
.
name
));
pInfo
->
tempdir
.
size
=
tsTempSpace
.
size
;
return
vm
GetTfsMonitor
Info
(
dndAcquireWrapper
(
pDnode
,
VNODES
),
pInfo
);
return
vm
MonitorTfs
Info
(
dndAcquireWrapper
(
pDnode
,
VNODES
),
pInfo
);
}
static
void
dndGetMonitorBasicInfo
(
SDnode
*
pDnode
,
SMonBasicInfo
*
pInfo
)
{
...
...
@@ -45,7 +45,7 @@ static void dndGetMonitorDnodeInfo(SDnode *pDnode, SMonDnodeInfo *pInfo) {
taosGetCardInfo
(
&
pInfo
->
net_in
,
&
pInfo
->
net_out
);
taosGetProcIO
(
&
pInfo
->
io_read
,
&
pInfo
->
io_write
,
&
pInfo
->
io_read_disk
,
&
pInfo
->
io_write_disk
);
vm
Get
VnodeReqs
(
dndAcquireWrapper
(
pDnode
,
VNODES
),
pInfo
);
vm
Monitor
VnodeReqs
(
dndAcquireWrapper
(
pDnode
,
VNODES
),
pInfo
);
pInfo
->
has_mnode
=
(
dndAcquireWrapper
(
pDnode
,
MNODE
)
->
required
);
}
...
...
@@ -63,7 +63,7 @@ void dndSendMonitorReport(SDnode *pDnode) {
SMonClusterInfo
clusterInfo
=
{
0
};
SMonVgroupInfo
vgroupInfo
=
{
0
};
SMonGrantInfo
grantInfo
=
{
0
};
if
(
mm
GetMonitor
Info
(
dndAcquireWrapper
(
pDnode
,
MNODE
),
&
clusterInfo
,
&
vgroupInfo
,
&
grantInfo
)
==
0
)
{
if
(
mm
MonitorMnode
Info
(
dndAcquireWrapper
(
pDnode
,
MNODE
),
&
clusterInfo
,
&
vgroupInfo
,
&
grantInfo
)
==
0
)
{
monSetClusterInfo
(
pMonitor
,
&
clusterInfo
);
monSetVgroupInfo
(
pMonitor
,
&
vgroupInfo
);
monSetGrantInfo
(
pMonitor
,
&
grantInfo
);
...
...
source/dnode/mgmt/dnode/src/dmMsg.c
浏览文件 @
2a62d568
...
...
@@ -42,7 +42,7 @@ void dmSendStatusReq(SDnodeMgmt *pMgmt) {
taosRUnLockLatch
(
&
pMgmt
->
latch
);
req
.
pVloads
=
taosArrayInit
(
TSDB_MAX_VNODES
,
sizeof
(
SVnodeLoad
));
vm
Get
VnodeLoads
(
dndAcquireWrapper
(
pDnode
,
VNODES
),
req
.
pVloads
);
vm
Monitor
VnodeLoads
(
dndAcquireWrapper
(
pDnode
,
VNODES
),
req
.
pVloads
);
int32_t
contLen
=
tSerializeSStatusReq
(
NULL
,
0
,
&
req
);
void
*
pHead
=
rpcMallocCont
(
contLen
);
...
...
source/dnode/mgmt/mnode/inc/mm.h
浏览文件 @
2a62d568
...
...
@@ -25,7 +25,7 @@ extern "C" {
void
mmGetMgmtFp
(
SMgmtWrapper
*
pMgmt
);
int32_t
mmGetUserAuth
(
SMgmtWrapper
*
pWrapper
,
char
*
user
,
char
*
spi
,
char
*
encrypt
,
char
*
secret
,
char
*
ckey
);
int32_t
mm
GetMonitor
Info
(
SMgmtWrapper
*
pWrapper
,
SMonClusterInfo
*
pClusterInfo
,
SMonVgroupInfo
*
pVgroupInfo
,
int32_t
mm
MonitorMnode
Info
(
SMgmtWrapper
*
pWrapper
,
SMonClusterInfo
*
pClusterInfo
,
SMonVgroupInfo
*
pVgroupInfo
,
SMonGrantInfo
*
pGrantInfo
);
#ifdef __cplusplus
...
...
source/dnode/mgmt/mnode/src/mmInt.c
浏览文件 @
2a62d568
...
...
@@ -132,7 +132,7 @@ static int32_t mmOpenImp(SMnodeMgmt *pMgmt, SDCreateMnodeReq *pReq) {
}
bool
deployed
=
true
;
if
(
dndWriteFile
(
pMgmt
->
pWrapper
,
deployed
)
!=
0
)
{
if
(
mmWriteFile
(
pMgmt
,
deployed
)
!=
0
)
{
dError
(
"failed to write mnode file since %s"
,
terrstr
());
return
-
1
;
}
...
...
@@ -243,7 +243,7 @@ int32_t mmGetUserAuth(SMgmtWrapper *pWrapper, char *user, char *spi, char *encry
return
code
;
}
int32_t
mm
GetMonitor
Info
(
SMgmtWrapper
*
pWrapper
,
SMonClusterInfo
*
pClusterInfo
,
SMonVgroupInfo
*
pVgroupInfo
,
int32_t
mm
MonitorMnode
Info
(
SMgmtWrapper
*
pWrapper
,
SMonClusterInfo
*
pClusterInfo
,
SMonVgroupInfo
*
pVgroupInfo
,
SMonGrantInfo
*
pGrantInfo
)
{
SMnodeMgmt
*
pMgmt
=
pWrapper
->
pMgmt
;
return
mndGetMonitorInfo
(
pMgmt
->
pMnode
,
pClusterInfo
,
pVgroupInfo
,
pGrantInfo
);
...
...
source/dnode/mgmt/vnode/inc/vm.h
浏览文件 @
2a62d568
...
...
@@ -34,11 +34,10 @@ typedef struct {
}
SVnodesStat
;
void
vmGetMgmtFp
(
SMgmtWrapper
*
pWrapper
);
void
vmInitMsgHandles
(
SMgmtWrapper
*
pWrapper
);
void
vm
Get
VnodeLoads
(
SMgmtWrapper
*
pWrapper
,
SArray
*
pLoads
);
int32_t
vm
GetTfsMonitor
Info
(
SMgmtWrapper
*
pWrapper
,
SMonDiskInfo
*
pInfo
);
void
vm
Get
VnodeReqs
(
SMgmtWrapper
*
pWrapper
,
SMonDnodeInfo
*
pInfo
);
void
vm
Monitor
VnodeLoads
(
SMgmtWrapper
*
pWrapper
,
SArray
*
pLoads
);
int32_t
vm
MonitorTfs
Info
(
SMgmtWrapper
*
pWrapper
,
SMonDiskInfo
*
pInfo
);
void
vm
Monitor
VnodeReqs
(
SMgmtWrapper
*
pWrapper
,
SMonDnodeInfo
*
pInfo
);
#ifdef __cplusplus
}
...
...
source/dnode/mgmt/vnode/inc/vmInt.h
浏览文件 @
2a62d568
...
...
@@ -82,6 +82,7 @@ int32_t vmOpenVnode(SVnodesMgmt *pMgmt, SWrapperCfg *pCfg, SVnode *pImpl);
void
vmCloseVnode
(
SVnodesMgmt
*
pMgmt
,
SVnodeObj
*
pVnode
);
// vmMsg.c
void
vmInitMsgHandles
(
SMgmtWrapper
*
pWrapper
);
int32_t
vmProcessCreateVnodeReq
(
SVnodesMgmt
*
pMgmt
,
SNodeMsg
*
pReq
);
int32_t
vmProcessAlterVnodeReq
(
SVnodesMgmt
*
pMgmt
,
SNodeMsg
*
pReq
);
int32_t
vmProcessDropVnodeReq
(
SVnodesMgmt
*
pMgmt
,
SNodeMsg
*
pReq
);
...
...
source/dnode/mgmt/vnode/src/vmInt.c
浏览文件 @
2a62d568
...
...
@@ -341,14 +341,14 @@ void vmGetMgmtFp(SMgmtWrapper *pWrapper) {
pWrapper
->
fp
=
mgmtFp
;
}
int32_t
vm
GetTfsMonitor
Info
(
SMgmtWrapper
*
pWrapper
,
SMonDiskInfo
*
pInfo
)
{
int32_t
vm
MonitorTfs
Info
(
SMgmtWrapper
*
pWrapper
,
SMonDiskInfo
*
pInfo
)
{
SVnodesMgmt
*
pMgmt
=
pWrapper
->
pMgmt
;
if
(
pMgmt
==
NULL
)
return
-
1
;
return
tfsGetMonitorInfo
(
pMgmt
->
pTfs
,
pInfo
);
}
void
vm
Get
VnodeReqs
(
SMgmtWrapper
*
pWrapper
,
SMonDnodeInfo
*
pInfo
)
{
void
vm
Monitor
VnodeReqs
(
SMgmtWrapper
*
pWrapper
,
SMonDnodeInfo
*
pInfo
)
{
SVnodesMgmt
*
pMgmt
=
pWrapper
->
pMgmt
;
if
(
pMgmt
==
NULL
)
return
;
...
...
@@ -363,7 +363,7 @@ void vmGetVnodeReqs(SMgmtWrapper *pWrapper, SMonDnodeInfo *pInfo) {
pInfo
->
masters
=
pStat
->
masterNum
;
}
void
vm
Get
VnodeLoads
(
SMgmtWrapper
*
pWrapper
,
SArray
*
pLoads
)
{
void
vm
Monitor
VnodeLoads
(
SMgmtWrapper
*
pWrapper
,
SArray
*
pLoads
)
{
SVnodesMgmt
*
pMgmt
=
pWrapper
->
pMgmt
;
SVnodesStat
*
pStat
=
&
pMgmt
->
state
;
int32_t
totalVnodes
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录