Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c9f8a110
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
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看板
提交
c9f8a110
编写于
12月 28, 2021
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix show dnodes error
上级
56767357
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
26 addition
and
11 deletion
+26
-11
source/dnode/mnode/impl/inc/mndDef.h
source/dnode/mnode/impl/inc/mndDef.h
+0
-5
source/dnode/mnode/impl/inc/mndInt.h
source/dnode/mnode/impl/inc/mndInt.h
+1
-0
source/dnode/mnode/impl/inc/mndVgroup.h
source/dnode/mnode/impl/inc/mndVgroup.h
+1
-0
source/dnode/mnode/impl/src/mndDnode.c
source/dnode/mnode/impl/src/mndDnode.c
+2
-3
source/dnode/mnode/impl/src/mndVgroup.c
source/dnode/mnode/impl/src/mndVgroup.c
+2
-1
tests/script/general/db/basic1.sim
tests/script/general/db/basic1.sim
+20
-2
未找到文件。
source/dnode/mnode/impl/inc/mndDef.h
浏览文件 @
c9f8a110
...
...
@@ -124,12 +124,7 @@ typedef struct {
int64_t
rebootTime
;
int64_t
lastAccessTime
;
int32_t
accessTimes
;
int16_t
numOfMnodes
;
int16_t
numOfVnodes
;
int16_t
numOfQnodes
;
int16_t
numOfSupportMnodes
;
int16_t
numOfSupportVnodes
;
int16_t
numOfSupportQnodes
;
int16_t
numOfCores
;
EDndStatus
status
;
EDndReason
offlineReason
;
...
...
source/dnode/mnode/impl/inc/mndInt.h
浏览文件 @
c9f8a110
...
...
@@ -19,6 +19,7 @@
#include "mndDef.h"
#include "sdb.h"
#include "tcache.h"
#include "tep.h"
#include "tqueue.h"
#include "ttime.h"
...
...
source/dnode/mnode/impl/inc/mndVgroup.h
浏览文件 @
c9f8a110
...
...
@@ -29,6 +29,7 @@ void mndReleaseVgroup(SMnode *pMnode, SVgObj *pVgroup);
SSdbRaw
*
mndVgroupActionEncode
(
SVgObj
*
pVgroup
);
int32_t
mndAllocVgroup
(
SMnode
*
pMnode
,
SDbObj
*
pDb
,
SVgObj
**
ppVgroups
);
SEpSet
mndGetVgroupEpset
(
SMnode
*
pMnode
,
SVgObj
*
pVgroup
);
int32_t
mndGetVnodesNum
(
SMnode
*
pMnode
,
int32_t
dnodeId
);
SCreateVnodeMsg
*
mndBuildCreateVnodeMsg
(
SMnode
*
pMnode
,
SDnodeObj
*
pDnode
,
SDbObj
*
pDb
,
SVgObj
*
pVgroup
);
SDropVnodeMsg
*
mndBuildDropVnodeMsg
(
SMnode
*
pMnode
,
SDnodeObj
*
pDnode
,
SDbObj
*
pDb
,
SVgObj
*
pVgroup
);
...
...
source/dnode/mnode/impl/src/mndDnode.c
浏览文件 @
c9f8a110
...
...
@@ -18,8 +18,7 @@
#include "mndMnode.h"
#include "mndShow.h"
#include "mndTrans.h"
#include "tep.h"
#include "ttime.h"
#include "mndVgroup.h"
#define TSDB_DNODE_VER_NUMBER 1
#define TSDB_DNODE_RESERVE_SIZE 64
...
...
@@ -699,7 +698,7 @@ static int32_t mndRetrieveDnodes(SMnodeMsg *pMsg, SShowObj *pShow, char *data, i
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
*
(
int16_t
*
)
pWrite
=
pDnode
->
numOfVnodes
;
*
(
int16_t
*
)
pWrite
=
mndGetVnodesNum
(
pMnode
,
pDnode
->
id
)
;
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
...
...
source/dnode/mnode/impl/src/mndVgroup.c
浏览文件 @
c9f8a110
...
...
@@ -348,6 +348,7 @@ static int32_t mndProcessDropVnodeRsp(SMnodeMsg *pMsg) {
}
static
int32_t
mndProcessSyncVnodeRsp
(
SMnodeMsg
*
pMsg
)
{
return
0
;
}
static
int32_t
mndProcessCompactVnodeRsp
(
SMnodeMsg
*
pMsg
)
{
return
0
;
}
static
int32_t
mndGetVgroupMaxReplica
(
SMnode
*
pMnode
,
char
*
dbName
,
int8_t
*
pReplica
,
int32_t
*
pNumOfVgroups
)
{
...
...
@@ -478,7 +479,7 @@ static void mndCancelGetNextVgroup(SMnode *pMnode, void *pIter) {
sdbCancelFetch
(
pSdb
,
pIter
);
}
static
int32_t
mndGetVnodesNum
(
SMnode
*
pMnode
,
int32_t
dnodeId
)
{
int32_t
mndGetVnodesNum
(
SMnode
*
pMnode
,
int32_t
dnodeId
)
{
SSdb
*
pSdb
=
pMnode
->
pSdb
;
int32_t
numOfVnodes
=
0
;
void
*
pIter
=
NULL
;
...
...
tests/script/general/db/basic1.sim
浏览文件 @
c9f8a110
...
...
@@ -59,9 +59,27 @@ if $data03 != 0 then
endi
print =============== show vgroups
sql use d4
sql show databases
if $rows == 1 then
return -1
endi
sql use d1
sql show vgroups
if $rows != 2 then
return -1
endi
print =============== show dnodes
sql show dnodes
if $data00 != 1 then
return -1
endi
if $
rows == 0 then
if $
data02 != 2 then
return -1
endi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录