Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
2a880600
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看板
提交
2a880600
编写于
4月 09, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat[cluster]: create and drop snode bnode
上级
f18cdd5f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
20 addition
and
2 deletion
+20
-2
source/dnode/mnode/impl/src/mndInfoSchema.c
source/dnode/mnode/impl/src/mndInfoSchema.c
+12
-0
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+4
-0
source/libs/nodes/src/nodesUtilFuncs.c
source/libs/nodes/src/nodesUtilFuncs.c
+2
-0
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+2
-2
未找到文件。
source/dnode/mnode/impl/src/mndInfoSchema.c
浏览文件 @
2a880600
...
...
@@ -47,6 +47,16 @@ static const SInfosTableSchema qnodesSchema[] = {
{.
name
=
"endpoint"
,
.
bytes
=
TSDB_EP_LEN
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_BINARY
},
{.
name
=
"create_time"
,
.
bytes
=
8
,
.
type
=
TSDB_DATA_TYPE_TIMESTAMP
},
};
static
const
SInfosTableSchema
snodesSchema
[]
=
{
{.
name
=
"id"
,
.
bytes
=
4
,
.
type
=
TSDB_DATA_TYPE_INT
},
{.
name
=
"endpoint"
,
.
bytes
=
TSDB_EP_LEN
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_BINARY
},
{.
name
=
"create_time"
,
.
bytes
=
8
,
.
type
=
TSDB_DATA_TYPE_TIMESTAMP
},
};
static
const
SInfosTableSchema
bnodesSchema
[]
=
{
{.
name
=
"id"
,
.
bytes
=
4
,
.
type
=
TSDB_DATA_TYPE_INT
},
{.
name
=
"endpoint"
,
.
bytes
=
TSDB_EP_LEN
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_BINARY
},
{.
name
=
"create_time"
,
.
bytes
=
8
,
.
type
=
TSDB_DATA_TYPE_TIMESTAMP
},
};
static
const
SInfosTableSchema
userDBSchema
[]
=
{
{.
name
=
"name"
,
.
bytes
=
SYSTABLE_SCH_DB_NAME_LEN
,
.
type
=
TSDB_DATA_TYPE_BINARY
},
{.
name
=
"create_time"
,
.
bytes
=
8
,
.
type
=
TSDB_DATA_TYPE_TIMESTAMP
},
...
...
@@ -184,6 +194,8 @@ static const SInfosTableMeta infosMeta[] = {
{
TSDB_INS_TABLE_MNODES
,
mnodesSchema
,
tListLen
(
mnodesSchema
)},
{
TSDB_INS_TABLE_MODULES
,
modulesSchema
,
tListLen
(
modulesSchema
)},
{
TSDB_INS_TABLE_QNODES
,
qnodesSchema
,
tListLen
(
qnodesSchema
)},
{
TSDB_INS_TABLE_SNODES
,
snodesSchema
,
tListLen
(
snodesSchema
)},
{
TSDB_INS_TABLE_BNODES
,
bnodesSchema
,
tListLen
(
snodesSchema
)},
{
TSDB_INS_TABLE_USER_DATABASES
,
userDBSchema
,
tListLen
(
userDBSchema
)},
{
TSDB_INS_TABLE_USER_FUNCTIONS
,
userFuncSchema
,
tListLen
(
userFuncSchema
)},
{
TSDB_INS_TABLE_USER_INDEXES
,
userIdxSchema
,
tListLen
(
userIdxSchema
)},
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
2a880600
...
...
@@ -783,6 +783,10 @@ SOperatorInfo* createSysTableScanOperatorInfo(void* pSysTableReadHandle, SSDataB
tableType
=
TSDB_MGMT_TABLE_MODULE
;
}
else
if
(
strncasecmp
(
name
,
TSDB_INS_TABLE_QNODES
,
tListLen
(
pName
->
tname
))
==
0
)
{
tableType
=
TSDB_MGMT_TABLE_QNODE
;
}
else
if
(
strncasecmp
(
name
,
TSDB_INS_TABLE_SNODES
,
tListLen
(
pName
->
tname
))
==
0
)
{
tableType
=
TSDB_MGMT_TABLE_SNODE
;
}
else
if
(
strncasecmp
(
name
,
TSDB_INS_TABLE_BNODES
,
tListLen
(
pName
->
tname
))
==
0
)
{
tableType
=
TSDB_MGMT_TABLE_BNODE
;
}
else
if
(
strncasecmp
(
name
,
TSDB_INS_TABLE_USER_FUNCTIONS
,
tListLen
(
pName
->
tname
))
==
0
)
{
tableType
=
TSDB_MGMT_TABLE_FUNC
;
}
else
if
(
strncasecmp
(
name
,
TSDB_INS_TABLE_USER_INDEXES
,
tListLen
(
pName
->
tname
))
==
0
)
{
...
...
source/libs/nodes/src/nodesUtilFuncs.c
浏览文件 @
2a880600
...
...
@@ -158,6 +158,8 @@ SNodeptr nodesMakeNode(ENodeType type) {
case
QUERY_NODE_SHOW_FUNCTIONS_STMT
:
case
QUERY_NODE_SHOW_INDEXES_STMT
:
case
QUERY_NODE_SHOW_STREAMS_STMT
:
case
QUERY_NODE_SHOW_BNODES_STMT
:
case
QUERY_NODE_SHOW_SNODES_STMT
:
return
makeNode
(
type
,
sizeof
(
SShowStmt
));
case
QUERY_NODE_LOGIC_PLAN_SCAN
:
return
makeNode
(
type
,
sizeof
(
SScanLogicNode
));
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
2a880600
...
...
@@ -2059,7 +2059,7 @@ static int32_t translateCreateComponentNode(STranslateContext* pCxt, SCreateComp
}
pCxt
->
pCmdMsg
->
epSet
=
pCxt
->
pParseCxt
->
mgmtEpSet
;
pCxt
->
pCmdMsg
->
msgType
=
getCreateComponentNodeMsgType
(
nodeType
(
pStmt
));
pCxt
->
pCmdMsg
->
msgLen
=
tSerializeS
MCreateDrop
QSBNodeReq
(
NULL
,
0
,
&
createReq
);
pCxt
->
pCmdMsg
->
msgLen
=
tSerializeS
CreateDropM
QSBNodeReq
(
NULL
,
0
,
&
createReq
);
pCxt
->
pCmdMsg
->
pMsg
=
taosMemoryMalloc
(
pCxt
->
pCmdMsg
->
msgLen
);
if
(
NULL
==
pCxt
->
pCmdMsg
->
pMsg
)
{
return
TSDB_CODE_OUT_OF_MEMORY
;
...
...
@@ -2094,7 +2094,7 @@ static int32_t translateDropComponentNode(STranslateContext* pCxt, SDropComponen
}
pCxt
->
pCmdMsg
->
epSet
=
pCxt
->
pParseCxt
->
mgmtEpSet
;
pCxt
->
pCmdMsg
->
msgType
=
getDropComponentNodeMsgType
(
nodeType
(
pStmt
));
pCxt
->
pCmdMsg
->
msgLen
=
tSerializeS
MCreateDrop
QSBNodeReq
(
NULL
,
0
,
&
dropReq
);
pCxt
->
pCmdMsg
->
msgLen
=
tSerializeS
CreateDropM
QSBNodeReq
(
NULL
,
0
,
&
dropReq
);
pCxt
->
pCmdMsg
->
pMsg
=
taosMemoryMalloc
(
pCxt
->
pCmdMsg
->
msgLen
);
if
(
NULL
==
pCxt
->
pCmdMsg
->
pMsg
)
{
return
TSDB_CODE_OUT_OF_MEMORY
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录