Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
loser646
TDengine
提交
6f65c5a9
T
TDengine
项目概览
loser646
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
1
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6f65c5a9
编写于
3月 26, 2020
作者:
S
slguan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-9] error while get metadata
上级
66de5c58
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
28 addition
and
24 deletion
+28
-24
src/mnode/src/mgmtChildTable.c
src/mnode/src/mgmtChildTable.c
+6
-6
src/mnode/src/mgmtSuperTable.c
src/mnode/src/mgmtSuperTable.c
+2
-2
src/mnode/src/mgmtTable.c
src/mnode/src/mgmtTable.c
+7
-0
src/mnode/src/mgmtVgroup.c
src/mnode/src/mgmtVgroup.c
+13
-16
未找到文件。
src/mnode/src/mgmtChildTable.c
浏览文件 @
6f65c5a9
...
...
@@ -725,13 +725,13 @@ static int32_t mgmtDoGetChildTableMeta(SDbObj *pDb, SChildTableObj *pTable, STab
if
(
pTable
->
info
.
type
==
TSDB_CHILD_TABLE
)
{
pMeta
->
sversion
=
htons
(
pTable
->
superTable
->
sversion
);
pMeta
->
numOfTags
=
htons
(
pTable
->
superTable
->
numOfTags
)
;
pMeta
->
numOfColumns
=
htons
(
pTable
->
superTable
->
numOfColumns
);
pMeta
->
numOfTags
=
0
;
pMeta
->
numOfColumns
=
htons
(
(
int16_t
)
pTable
->
superTable
->
numOfColumns
);
pMeta
->
contLen
=
sizeof
(
STableMetaMsg
)
+
mgmtSetSchemaFromSuperTable
(
pMeta
->
schema
,
pTable
->
superTable
);
}
else
{
pMeta
->
sversion
=
htons
(
pTable
->
sversion
);
pMeta
->
numOfTags
=
0
;
pMeta
->
numOfColumns
=
htons
(
pTable
->
numOfColumns
);
pMeta
->
numOfColumns
=
htons
(
(
int16_t
)
pTable
->
numOfColumns
);
pMeta
->
contLen
=
sizeof
(
STableMetaMsg
)
+
mgmtSetSchemaFromNormalTable
(
pMeta
->
schema
,
pTable
);
}
...
...
@@ -758,9 +758,9 @@ static int32_t mgmtDoGetChildTableMeta(SDbObj *pDb, SChildTableObj *pTable, STab
void
mgmtGetChildTableMeta
(
SQueuedMsg
*
pMsg
,
SChildTableObj
*
pTable
)
{
SCMTableInfoMsg
*
pInfo
=
pMsg
->
pCont
;
SDbObj
*
pDb
=
mgmtGetDbByTableId
(
p
Table
->
info
.
tableId
);
SDbObj
*
pDb
=
mgmtGetDbByTableId
(
p
Info
->
tableId
);
if
(
pDb
==
NULL
||
pDb
->
dirty
)
{
mError
(
"table:%s, failed to get table meta, db not selected"
,
p
Table
->
info
.
tableId
);
mError
(
"table:%s, failed to get table meta, db not selected"
,
p
Info
->
tableId
);
mgmtSendSimpleResp
(
pMsg
->
thandle
,
TSDB_CODE_DB_NOT_SELECTED
);
return
;
}
...
...
@@ -877,7 +877,7 @@ static STableInfo* mgmtGetTableByPos(uint32_t dnodeId, int32_t vnode, int32_t si
return
NULL
;
}
return
pVgroup
->
tableList
[
sid
];
return
(
STableInfo
*
)
pVgroup
->
tableList
[
sid
];
}
static
void
mgmtProcessTableCfgMsg
(
SRpcMsg
*
rpcMsg
)
{
...
...
src/mnode/src/mgmtSuperTable.c
浏览文件 @
6f65c5a9
...
...
@@ -610,8 +610,8 @@ void mgmtGetSuperTableMeta(SQueuedMsg *pMsg, SSuperTableObj *pTable) {
pMeta
->
uid
=
htobe64
(
pTable
->
uid
);
pMeta
->
sversion
=
htons
(
pTable
->
sversion
);
pMeta
->
precision
=
pDb
->
cfg
.
precision
;
pMeta
->
numOfTags
=
pTable
->
numOfTags
;
pMeta
->
numOfColumns
=
htons
(
pTable
->
numOfColumns
);
pMeta
->
numOfTags
=
htons
((
int16_t
)
pTable
->
numOfTags
)
;
pMeta
->
numOfColumns
=
htons
(
(
int16_t
)
pTable
->
numOfColumns
);
pMeta
->
tableType
=
pTable
->
info
.
type
;
pMeta
->
contLen
=
sizeof
(
STableMetaMsg
)
+
mgmtSetSchemaFromSuperTable
(
pMeta
->
schema
,
pTable
);
strcpy
(
pMeta
->
tableId
,
pTable
->
info
.
tableId
);
...
...
src/mnode/src/mgmtTable.c
浏览文件 @
6f65c5a9
...
...
@@ -230,6 +230,13 @@ static void mgmtProcessTableMetaMsg(SQueuedMsg *pMsg) {
SCMTableInfoMsg
*
pInfo
=
pMsg
->
pCont
;
mTrace
(
"table:%s, table meta msg is received from thandle:%p"
,
pInfo
->
tableId
,
pMsg
->
thandle
);
pMsg
->
pDb
=
mgmtGetDbByTableId
(
pInfo
->
tableId
);
if
(
pMsg
->
pDb
==
NULL
||
pMsg
->
pDb
->
dirty
)
{
mError
(
"table:%s, failed to get table meta, db not selected"
,
pInfo
->
tableId
);
mgmtSendSimpleResp
(
pMsg
->
thandle
,
TSDB_CODE_DB_NOT_SELECTED
);
return
;
}
STableInfo
*
pTable
=
mgmtGetTable
(
pInfo
->
tableId
);
if
(
pTable
==
NULL
||
pTable
->
type
!=
TSDB_SUPER_TABLE
)
{
mgmtGetChildTableMeta
(
pMsg
,
(
SChildTableObj
*
)
pTable
);
...
...
src/mnode/src/mgmtVgroup.c
浏览文件 @
6f65c5a9
...
...
@@ -25,6 +25,7 @@
#include "mgmtDClient.h"
#include "mgmtDnode.h"
#include "mgmtDServer.h"
#include "mgmtMnode.h"
#include "mgmtProfile.h"
#include "mgmtSdb.h"
#include "mgmtShell.h"
...
...
@@ -483,17 +484,6 @@ SMDCreateVnodeMsg *mgmtBuildCreateVnodeMsg(SVgObj *pVgroup) {
return
pVnode
;
}
static
SVgObj
*
mgmtGetVgroupInDnode
(
uint32_t
dnodeId
,
int32_t
vgId
)
{
if
(
vnovgId
<
1
||
dnodeId
<
1
)
return
NULL
;
SDnodeObj
*
pDnode
=
mgmtGetDnode
(
dnodeId
);
if
(
pDnode
==
NULL
)
{
return
NULL
;
}
return
mgmtGetVgroup
(
vgId
);
}
SRpcIpSet
mgmtGetIpSetFromVgroup
(
SVgObj
*
pVgroup
)
{
SRpcIpSet
ipSet
=
{
.
numOfIps
=
pVgroup
->
numOfVnodes
,
...
...
@@ -657,19 +647,26 @@ static void mgmtProcessVnodeCfgMsg(SRpcMsg *rpcMsg) {
if
(
mgmtCheckRedirect
(
rpcMsg
->
handle
))
return
;
SDMConfigVnodeMsg
*
pCfg
=
(
SDMConfigVnodeMsg
*
)
rpcMsg
->
pCont
;
pCfg
->
dnodeId
=
htonl
(
pCfg
->
dnode
);
pCfg
->
vgId
=
htonl
(
pCfg
->
vnode
);
pCfg
->
dnodeId
=
htonl
(
pCfg
->
dnodeId
);
pCfg
->
vgId
=
htonl
(
pCfg
->
vgId
);
SDnodeObj
*
pDnode
=
mgmtGetDnode
(
pCfg
->
dnodeId
);
if
(
pDnode
==
NULL
)
{
mTrace
(
"dnode:%s, invalid dnode"
,
taosIpStr
(
pCfg
->
dnodeId
),
pCfg
->
vgId
);
mgmtSendSimpleResp
(
rpcMsg
->
handle
,
TSDB_CODE_NOT_ACTIVE_VNODE
);
return
;
}
SVgObj
*
pVgroup
=
mgmtGetVgroup
InDnode
(
pCfg
->
dnodeId
,
pCfg
->
vgId
);
SVgObj
*
pVgroup
=
mgmtGetVgroup
(
pCfg
->
vgId
);
if
(
pVgroup
==
NULL
)
{
mTrace
(
"dnode:%s, v
node:%d, no vgroup info"
,
taosIpStr
(
pCfg
->
dnode
),
pCfg
->
vnode
);
mTrace
(
"dnode:%s, v
gId:%d, no vgroup info"
,
taosIpStr
(
pCfg
->
dnodeId
),
pCfg
->
vgId
);
mgmtSendSimpleResp
(
rpcMsg
->
handle
,
TSDB_CODE_NOT_ACTIVE_VNODE
);
return
;
}
mgmtSendSimpleResp
(
rpcMsg
->
handle
,
TSDB_CODE_SUCCESS
);
SRpcIpSet
ipSet
=
mgmtGetIpSetFromIp
(
p
Cfg
->
dnode
);
SRpcIpSet
ipSet
=
mgmtGetIpSetFromIp
(
p
Dnode
->
privateIp
);
mgmtSendCreateVnodeMsg
(
pVgroup
,
&
ipSet
,
NULL
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录