Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
aac2a25e
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看板
提交
aac2a25e
编写于
5月 11, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
scripts
上级
3f88174a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
18 deletion
+16
-18
src/mnode/src/mgmtTable.c
src/mnode/src/mgmtTable.c
+13
-15
tests/script/general/db/vnodes.sim
tests/script/general/db/vnodes.sim
+1
-1
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+2
-2
未找到文件。
src/mnode/src/mgmtTable.c
浏览文件 @
aac2a25e
...
@@ -1241,9 +1241,8 @@ static void mgmtProcessSuperTableVgroupMsg(SQueuedMsg *pMsg) {
...
@@ -1241,9 +1241,8 @@ static void mgmtProcessSuperTableVgroupMsg(SQueuedMsg *pMsg) {
SCMSTableVgroupMsg
*
pInfo
=
pMsg
->
pCont
;
SCMSTableVgroupMsg
*
pInfo
=
pMsg
->
pCont
;
int32_t
numOfTable
=
htonl
(
pInfo
->
numOfTables
);
int32_t
numOfTable
=
htonl
(
pInfo
->
numOfTables
);
SCMSTableVgroupRspMsg
*
pRsp
=
NULL
;
// reserve space
int32_t
contLen
=
sizeof
(
SCMSTableVgroupRspMsg
)
+
32
*
sizeof
(
SCMVgroupInfo
)
+
sizeof
(
SVgroupsInfo
);
int32_t
contLen
=
sizeof
(
SCMSTableVgroupRspMsg
)
+
32
*
sizeof
(
SCMVgroupInfo
)
+
sizeof
(
SVgroupsInfo
);
//reserve space
for
(
int32_t
i
=
0
;
i
<
numOfTable
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
numOfTable
;
++
i
)
{
char
*
stableName
=
(
char
*
)
pInfo
+
sizeof
(
SCMSTableVgroupMsg
)
+
(
TSDB_TABLE_ID_LEN
)
*
i
;
char
*
stableName
=
(
char
*
)
pInfo
+
sizeof
(
SCMSTableVgroupMsg
)
+
(
TSDB_TABLE_ID_LEN
)
*
i
;
SSuperTableObj
*
pTable
=
mgmtGetSuperTable
(
stableName
);
SSuperTableObj
*
pTable
=
mgmtGetSuperTable
(
stableName
);
...
@@ -1253,7 +1252,7 @@ static void mgmtProcessSuperTableVgroupMsg(SQueuedMsg *pMsg) {
...
@@ -1253,7 +1252,7 @@ static void mgmtProcessSuperTableVgroupMsg(SQueuedMsg *pMsg) {
mgmtDecTableRef
(
pTable
);
mgmtDecTableRef
(
pTable
);
}
}
pRsp
=
rpcMallocCont
(
contLen
);
SCMSTableVgroupRspMsg
*
pRsp
=
rpcMallocCont
(
contLen
);
if
(
pRsp
==
NULL
)
{
if
(
pRsp
==
NULL
)
{
mgmtSendSimpleResp
(
pMsg
->
thandle
,
TSDB_CODE_SERV_OUT_OF_MEMORY
);
mgmtSendSimpleResp
(
pMsg
->
thandle
,
TSDB_CODE_SERV_OUT_OF_MEMORY
);
return
;
return
;
...
@@ -1265,32 +1264,31 @@ static void mgmtProcessSuperTableVgroupMsg(SQueuedMsg *pMsg) {
...
@@ -1265,32 +1264,31 @@ static void mgmtProcessSuperTableVgroupMsg(SQueuedMsg *pMsg) {
for
(
int32_t
i
=
0
;
i
<
numOfTable
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
numOfTable
;
++
i
)
{
char
*
stableName
=
(
char
*
)
pInfo
+
sizeof
(
SCMSTableVgroupMsg
)
+
(
TSDB_TABLE_ID_LEN
)
*
i
;
char
*
stableName
=
(
char
*
)
pInfo
+
sizeof
(
SCMSTableVgroupMsg
)
+
(
TSDB_TABLE_ID_LEN
)
*
i
;
SSuperTableObj
*
pTable
=
mgmtGetSuperTable
(
stableName
);
SSuperTableObj
*
pTable
=
mgmtGetSuperTable
(
stableName
);
SVgroupsInfo
*
pVgroup
=
(
SVgroupsInfo
*
)
msg
;
SVgroupsInfo
*
pVgroup
Info
=
(
SVgroupsInfo
*
)
msg
;
SHashMutableIterator
*
pIter
=
taosHashCreateIter
(
pTable
->
vgHash
);
SHashMutableIterator
*
pIter
=
taosHashCreateIter
(
pTable
->
vgHash
);
int32_t
vgSize
=
0
;
int32_t
vgSize
=
0
;
while
(
taosHashIterNext
(
pIter
))
{
while
(
taosHashIterNext
(
pIter
))
{
int32_t
*
pVgId
=
taosHashIterGet
(
pIter
);
int32_t
*
pVgId
=
taosHashIterGet
(
pIter
);
SVgObj
*
pVgItem
=
mgmtGetVgroup
(
*
pVgId
SVgObj
*
pVgroup
=
mgmtGetVgroup
(
*
pVgId
);
);
if
(
pVgroup
==
NULL
)
continue
;
if
(
pVgItem
==
NULL
)
continue
;
pVgroup
->
vgroups
[
vgSize
].
vgId
=
htonl
(
pVgItem
->
vgId
);
pVgroup
Info
->
vgroups
[
vgSize
].
vgId
=
htonl
(
pVgroup
->
vgId
);
for
(
int32_t
vn
=
0
;
vn
<
pVg
Item
->
numOfVnodes
;
++
vn
)
{
for
(
int32_t
vn
=
0
;
vn
<
pVg
roup
->
numOfVnodes
;
++
vn
)
{
SDnodeObj
*
pDnode
=
pVg
Item
->
vnodeGid
[
vn
].
pDnode
;
SDnodeObj
*
pDnode
=
pVg
roup
->
vnodeGid
[
vn
].
pDnode
;
if
(
pDnode
==
NULL
)
break
;
if
(
pDnode
==
NULL
)
break
;
strncpy
(
pVgroup
->
vgroups
[
vgSize
].
ipAddr
[
vn
].
fqdn
,
pDnode
->
dnodeFqdn
,
tListLen
(
pDnode
->
dnodeFqdn
));
strncpy
(
pVgroup
Info
->
vgroups
[
vgSize
].
ipAddr
[
vn
].
fqdn
,
pDnode
->
dnodeFqdn
,
tListLen
(
pDnode
->
dnodeFqdn
));
pVgroup
->
vgroups
[
vgSize
].
ipAddr
[
vn
].
port
=
htons
(
tsDnodeShellPort
);
pVgroup
Info
->
vgroups
[
vgSize
].
ipAddr
[
vn
].
port
=
htons
(
tsDnodeShellPort
);
pVgroup
->
vgroups
[
vgSize
].
numOfIps
++
;
pVgroup
Info
->
vgroups
[
vgSize
].
numOfIps
++
;
}
}
vgSize
++
;
vgSize
++
;
mgmtDecVgroupRef
(
pVg
Item
);
mgmtDecVgroupRef
(
pVg
roup
);
}
}
pVgroup
->
numOfVgroups
=
htonl
(
vgSize
);
pVgroup
Info
->
numOfVgroups
=
htonl
(
vgSize
);
// one table is done, try the next table
// one table is done, try the next table
msg
+=
sizeof
(
SVgroupsInfo
)
+
vgSize
*
sizeof
(
SCMVgroupInfo
);
msg
+=
sizeof
(
SVgroupsInfo
)
+
vgSize
*
sizeof
(
SCMVgroupInfo
);
...
...
tests/script/general/db/vnodes.sim
浏览文件 @
aac2a25e
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
$totalVnodes = 10
0
$totalVnodes = 10
$maxTables = 4
$maxTables = 4
$totalRows = $totalVnodes * $maxTables
$totalRows = $totalVnodes * $maxTables
...
...
tests/script/jenkins/basic.txt
浏览文件 @
aac2a25e
...
@@ -156,7 +156,7 @@ cd ../../../debug; make
...
@@ -156,7 +156,7 @@ cd ../../../debug; make
#./test.sh -f general/stable/disk.sim
#./test.sh -f general/stable/disk.sim
#./test.sh -f general/stable/metrics.sim
#./test.sh -f general/stable/metrics.sim
#./test.sh -f general/stable/values.sim
#./test.sh -f general/stable/values.sim
#
./test.sh -f general/stable/vnode3.sim
./test.sh -f general/stable/vnode3.sim
./test.sh -f general/table/autocreate.sim
./test.sh -f general/table/autocreate.sim
./test.sh -f general/table/basic1.sim
./test.sh -f general/table/basic1.sim
...
@@ -244,7 +244,7 @@ cd ../../../debug; make
...
@@ -244,7 +244,7 @@ cd ../../../debug; make
./test.sh -u -f unique/account/user_len.sim
./test.sh -u -f unique/account/user_len.sim
#./test.sh -u -f unique/big/balance.sim
#./test.sh -u -f unique/big/balance.sim
#./test.sh -u -f unique/big/maxvnodes.sim
#
slguan
./test.sh -u -f unique/big/maxvnodes.sim
./test.sh -u -f unique/big/tcp.sim
./test.sh -u -f unique/big/tcp.sim
##./test.sh -u -f unique/cluster/balance1.sim
##./test.sh -u -f unique/cluster/balance1.sim
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录