Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
499170d3
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
499170d3
编写于
5月 18, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-361] fix bug in show vgroups
上级
738733e1
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
12 addition
and
37 deletion
+12
-37
src/mnode/inc/mgmtDef.h
src/mnode/inc/mgmtDef.h
+0
-1
src/mnode/inc/mgmtVgroup.h
src/mnode/inc/mgmtVgroup.h
+0
-5
src/mnode/src/mgmtVgroup.c
src/mnode/src/mgmtVgroup.c
+2
-13
tests/script/unique/big/maxvnodes.sim
tests/script/unique/big/maxvnodes.sim
+10
-18
未找到文件。
src/mnode/inc/mgmtDef.h
浏览文件 @
499170d3
...
...
@@ -123,7 +123,6 @@ typedef struct SVgObj {
int32_t
numOfVnodes
;
int32_t
lbDnodeId
;
int32_t
lbTime
;
int8_t
status
;
int8_t
inUse
;
int8_t
reserved
[
13
];
int8_t
updateEnd
[
1
];
...
...
src/mnode/inc/mgmtVgroup.h
浏览文件 @
499170d3
...
...
@@ -22,11 +22,6 @@ extern "C" {
#include "mgmtDef.h"
enum
_TSDB_VG_STATUS
{
TSDB_VG_STATUS_READY
,
TSDB_VG_STATUS_UPDATE
};
int32_t
mgmtInitVgroups
();
void
mgmtCleanUpVgroups
();
SVgObj
*
mgmtGetVgroup
(
int32_t
vgId
);
...
...
src/mnode/src/mgmtVgroup.c
浏览文件 @
499170d3
...
...
@@ -371,12 +371,6 @@ int32_t mgmtGetVgroupMeta(STableMetaMsg *pMeta, SShowObj *pShow, void *pConn) {
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
pShow
->
bytes
[
cols
]
=
9
+
VARSTR_HEADER_SIZE
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_BINARY
;
strcpy
(
pSchema
[
cols
].
name
,
"vgroup_status"
);
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
int32_t
maxReplica
=
0
;
SVgObj
*
pVgroup
=
NULL
;
STableObj
*
pTable
=
NULL
;
...
...
@@ -471,11 +465,6 @@ int32_t mgmtRetrieveVgroups(SShowObj *pShow, char *data, int32_t rows, void *pCo
*
(
int32_t
*
)
pWrite
=
pVgroup
->
numOfTables
;
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
char
*
status
=
pVgroup
->
status
?
"updating"
:
"ready"
;
STR_TO_VARSTR
(
pWrite
,
status
);
cols
++
;
for
(
int32_t
i
=
0
;
i
<
maxReplica
;
++
i
)
{
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
*
(
int16_t
*
)
pWrite
=
pVgroup
->
vnodeGid
[
i
].
dnodeId
;
...
...
@@ -489,8 +478,8 @@ int32_t mgmtRetrieveVgroups(SShowObj *pShow, char *data, int32_t rows, void *pCo
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
status
=
mgmtGetMnodeRoleStr
(
pVgroup
->
vnodeGid
[
i
].
role
);
STR_TO_VARSTR
(
pWrite
,
status
);
char
*
role
=
mgmtGetMnodeRoleStr
(
pVgroup
->
vnodeGid
[
i
].
role
);
STR_TO_VARSTR
(
pWrite
,
role
);
cols
++
;
}
else
{
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
...
...
tests/script/unique/big/maxvnodes.sim
浏览文件 @
499170d3
system sh/stop_dnodes.sh
$totalVnodes = 100
$minVnodes =
48
$maxVnodes = 5
2
$minVnodes =
50
$maxVnodes = 5
0
$maxTables = 4
$totalRows = $totalVnodes * $maxTables
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $maxTables
system sh/cfg.sh -n dnode1 -c walLevel -v 2
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v $totalVnodes
system sh/
cfg.sh -n dnode1 -c maxVnodeConnections -v 100000
system sh/cfg.sh -n dnode
1 -c maxMeterConnections -v 100000
system sh/cfg.sh -n dnode
1 -c maxShellConns -v 100000
system sh/cfg.sh -n dnode1 -c maxMgmtConnections -v 100000
system sh/
deploy.sh -n dnode2 -i 2
system sh/cfg.sh -n dnode
2 -c walLevel -v 2
system sh/cfg.sh -n dnode
2 -c numOfTotalVnodes -v $totalVnodes
print ========== prepare data
system sh/exec_up.sh -n dnode1 -s start
...
...
@@ -44,16 +43,7 @@ if $data00 != $totalRows then
return -1
endi
system sh/deploy.sh -n dnode2 -i 2
system sh/cfg.sh -n dnode2 -c walLevel -v 0
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 100
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 256
system sh/cfg.sh -n dnode2 -c maxVnodeConnections -v 100000
system sh/cfg.sh -n dnode2 -c maxMeterConnections -v 100000
system sh/cfg.sh -n dnode2 -c maxShellConns -v 100000
system sh/cfg.sh -n dnode2 -c maxMgmtConnections -v 100000
print ========== step2
print ========== step3
sql create dnode $hostname2
system sh/exec_up.sh -n dnode2 -s start
...
...
@@ -86,6 +76,8 @@ if $data00 != $totalRows then
return -1
endi
return
system sh/exec_up.sh -n dnode1 -s stop -x SIGINT
system sh/exec_up.sh -n dnode2 -s stop -x SIGINT
system sh/exec_up.sh -n dnode3 -s stop -x SIGINT
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录