Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
2164fc3f
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看板
提交
2164fc3f
编写于
1月 07, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
minor changes
上级
34fd49c7
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
220 addition
and
135 deletion
+220
-135
include/common/tmsg.h
include/common/tmsg.h
+2
-2
include/util/taoserror.h
include/util/taoserror.h
+12
-16
source/dnode/mgmt/impl/src/dndBnode.c
source/dnode/mgmt/impl/src/dndBnode.c
+2
-2
source/dnode/mgmt/impl/src/dndMnode.c
source/dnode/mgmt/impl/src/dndMnode.c
+49
-26
source/dnode/mgmt/impl/src/dndQnode.c
source/dnode/mgmt/impl/src/dndQnode.c
+2
-2
source/dnode/mgmt/impl/src/dndSnode.c
source/dnode/mgmt/impl/src/dndSnode.c
+2
-2
source/dnode/mgmt/impl/test/bnode/dbnode.cpp
source/dnode/mgmt/impl/test/bnode/dbnode.cpp
+2
-2
source/dnode/mgmt/impl/test/mnode/qmnode.cpp
source/dnode/mgmt/impl/test/mnode/qmnode.cpp
+117
-47
source/dnode/mgmt/impl/test/qnode/dqnode.cpp
source/dnode/mgmt/impl/test/qnode/dqnode.cpp
+2
-2
source/dnode/mgmt/impl/test/snode/dsnode.cpp
source/dnode/mgmt/impl/test/snode/dsnode.cpp
+2
-2
source/dnode/mnode/impl/src/mndMnode.c
source/dnode/mnode/impl/src/mndMnode.c
+16
-16
source/dnode/mnode/impl/test/mnode/mnode.cpp
source/dnode/mnode/impl/test/mnode/mnode.cpp
+8
-8
source/util/src/terror.c
source/util/src/terror.c
+4
-8
未找到文件。
include/common/tmsg.h
浏览文件 @
2164fc3f
...
...
@@ -916,13 +916,13 @@ typedef struct {
typedef
struct
{
int32_t
dnodeId
;
}
SMCreateMnode
Msg
,
SMDropMnodeMsg
,
SDDropMnodeMsg
;
}
SMCreateMnode
Req
,
SMDropMnodeReq
,
SDDropMnodeReq
;
typedef
struct
{
int32_t
dnodeId
;
int8_t
replica
;
SReplica
replicas
[
TSDB_MAX_REPLICA
];
}
SDCreateMnode
Msg
,
SDAlterMnodeMsg
;
}
SDCreateMnode
Req
,
SDAlterMnodeReq
;
typedef
struct
{
int32_t
dnodeId
;
...
...
include/util/taoserror.h
浏览文件 @
2164fc3f
...
...
@@ -259,28 +259,24 @@ int32_t* taosGetErrno();
#define TSDB_CODE_DND_DNODE_WRITE_FILE_ERROR TAOS_DEF_ERROR_CODE(0, 0x0411)
#define TSDB_CODE_DND_MNODE_ALREADY_DEPLOYED TAOS_DEF_ERROR_CODE(0, 0x0420)
#define TSDB_CODE_DND_MNODE_NOT_DEPLOYED TAOS_DEF_ERROR_CODE(0, 0x0421)
#define TSDB_CODE_DND_MNODE_ID_INVALID TAOS_DEF_ERROR_CODE(0, 0x0422)
#define TSDB_CODE_DND_MNODE_ID_NOT_FOUND TAOS_DEF_ERROR_CODE(0, 0x0423)
#define TSDB_CODE_DND_MNODE_READ_FILE_ERROR TAOS_DEF_ERROR_CODE(0, 0x0424)
#define TSDB_CODE_DND_MNODE_WRITE_FILE_ERROR TAOS_DEF_ERROR_CODE(0, 0x0425)
#define TSDB_CODE_DND_MNODE_INVALID_OPTION TAOS_DEF_ERROR_CODE(0, 0x0422)
#define TSDB_CODE_DND_MNODE_READ_FILE_ERROR TAOS_DEF_ERROR_CODE(0, 0x0423)
#define TSDB_CODE_DND_MNODE_WRITE_FILE_ERROR TAOS_DEF_ERROR_CODE(0, 0x0424)
#define TSDB_CODE_DND_QNODE_ALREADY_DEPLOYED TAOS_DEF_ERROR_CODE(0, 0x0430)
#define TSDB_CODE_DND_QNODE_NOT_DEPLOYED TAOS_DEF_ERROR_CODE(0, 0x0431)
#define TSDB_CODE_DND_QNODE_ID_INVALID TAOS_DEF_ERROR_CODE(0, 0x0432)
#define TSDB_CODE_DND_QNODE_ID_NOT_FOUND TAOS_DEF_ERROR_CODE(0, 0x0433)
#define TSDB_CODE_DND_QNODE_READ_FILE_ERROR TAOS_DEF_ERROR_CODE(0, 0x0434)
#define TSDB_CODE_DND_QNODE_WRITE_FILE_ERROR TAOS_DEF_ERROR_CODE(0, 0x0435)
#define TSDB_CODE_DND_QNODE_INVALID_OPTION TAOS_DEF_ERROR_CODE(0, 0x0432)
#define TSDB_CODE_DND_QNODE_READ_FILE_ERROR TAOS_DEF_ERROR_CODE(0, 0x0433)
#define TSDB_CODE_DND_QNODE_WRITE_FILE_ERROR TAOS_DEF_ERROR_CODE(0, 0x0434)
#define TSDB_CODE_DND_SNODE_ALREADY_DEPLOYED TAOS_DEF_ERROR_CODE(0, 0x0440)
#define TSDB_CODE_DND_SNODE_NOT_DEPLOYED TAOS_DEF_ERROR_CODE(0, 0x0441)
#define TSDB_CODE_DND_SNODE_ID_INVALID TAOS_DEF_ERROR_CODE(0, 0x0442)
#define TSDB_CODE_DND_SNODE_ID_NOT_FOUND TAOS_DEF_ERROR_CODE(0, 0x0443)
#define TSDB_CODE_DND_SNODE_READ_FILE_ERROR TAOS_DEF_ERROR_CODE(0, 0x0444)
#define TSDB_CODE_DND_SNODE_WRITE_FILE_ERROR TAOS_DEF_ERROR_CODE(0, 0x0445)
#define TSDB_CODE_DND_SNODE_INVALID_OPTION TAOS_DEF_ERROR_CODE(0, 0x0442)
#define TSDB_CODE_DND_SNODE_READ_FILE_ERROR TAOS_DEF_ERROR_CODE(0, 0x0443)
#define TSDB_CODE_DND_SNODE_WRITE_FILE_ERROR TAOS_DEF_ERROR_CODE(0, 0x0444)
#define TSDB_CODE_DND_BNODE_ALREADY_DEPLOYED TAOS_DEF_ERROR_CODE(0, 0x0450)
#define TSDB_CODE_DND_BNODE_NOT_DEPLOYED TAOS_DEF_ERROR_CODE(0, 0x0451)
#define TSDB_CODE_DND_BNODE_ID_INVALID TAOS_DEF_ERROR_CODE(0, 0x0452)
#define TSDB_CODE_DND_BNODE_ID_NOT_FOUND TAOS_DEF_ERROR_CODE(0, 0x0453)
#define TSDB_CODE_DND_BNODE_READ_FILE_ERROR TAOS_DEF_ERROR_CODE(0, 0x0454)
#define TSDB_CODE_DND_BNODE_WRITE_FILE_ERROR TAOS_DEF_ERROR_CODE(0, 0x0455)
#define TSDB_CODE_DND_BNODE_INVALID_OPTION TAOS_DEF_ERROR_CODE(0, 0x0452)
#define TSDB_CODE_DND_BNODE_READ_FILE_ERROR TAOS_DEF_ERROR_CODE(0, 0x0453)
#define TSDB_CODE_DND_BNODE_WRITE_FILE_ERROR TAOS_DEF_ERROR_CODE(0, 0x0454)
#define TSDB_CODE_DND_VNODE_TOO_MANY_VNODES TAOS_DEF_ERROR_CODE(0, 0x0460)
#define TSDB_CODE_DND_VNODE_READ_FILE_ERROR TAOS_DEF_ERROR_CODE(0, 0x0461)
#define TSDB_CODE_DND_VNODE_WRITE_FILE_ERROR TAOS_DEF_ERROR_CODE(0, 0x0462)
...
...
source/dnode/mgmt/impl/src/dndBnode.c
浏览文件 @
2164fc3f
...
...
@@ -268,7 +268,7 @@ int32_t dndProcessCreateBnodeReq(SDnode *pDnode, SRpcMsg *pRpcMsg) {
pMsg
->
dnodeId
=
htonl
(
pMsg
->
dnodeId
);
if
(
pMsg
->
dnodeId
!=
dndGetDnodeId
(
pDnode
))
{
terrno
=
TSDB_CODE_DND_BNODE_I
D_INVALID
;
terrno
=
TSDB_CODE_DND_BNODE_I
NVALID_OPTION
;
dError
(
"failed to create bnode since %s"
,
terrstr
());
return
-
1
;
}
else
{
...
...
@@ -281,7 +281,7 @@ int32_t dndProcessDropBnodeReq(SDnode *pDnode, SRpcMsg *pRpcMsg) {
pMsg
->
dnodeId
=
htonl
(
pMsg
->
dnodeId
);
if
(
pMsg
->
dnodeId
!=
dndGetDnodeId
(
pDnode
))
{
terrno
=
TSDB_CODE_DND_BNODE_I
D_INVALID
;
terrno
=
TSDB_CODE_DND_BNODE_I
NVALID_OPTION
;
dError
(
"failed to drop bnode since %s"
,
terrstr
());
return
-
1
;
}
else
{
...
...
source/dnode/mgmt/impl/src/dndMnode.c
浏览文件 @
2164fc3f
...
...
@@ -305,25 +305,24 @@ static void dndBuildMnodeOpenOption(SDnode *pDnode, SMnodeOpt *pOption) {
memcpy
(
&
pOption
->
replicas
,
pMgmt
->
replicas
,
sizeof
(
SReplica
)
*
TSDB_MAX_REPLICA
);
}
static
int32_t
dndBuildMnodeOptionFromReq
(
SDnode
*
pDnode
,
SMnodeOpt
*
pOption
,
SDCreateMnode
Msg
*
pReq
)
{
static
int32_t
dndBuildMnodeOptionFromReq
(
SDnode
*
pDnode
,
SMnodeOpt
*
pOption
,
SDCreateMnode
Req
*
pCreate
)
{
dndInitMnodeOption
(
pDnode
,
pOption
);
pOption
->
dnodeId
=
dndGetDnodeId
(
pDnode
);
pOption
->
clusterId
=
dndGetClusterId
(
pDnode
);
pOption
->
replica
=
p
Req
->
replica
;
pOption
->
replica
=
p
Create
->
replica
;
pOption
->
selfIndex
=
-
1
;
for
(
int32_t
i
=
0
;
i
<
p
Req
->
replica
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
p
Create
->
replica
;
++
i
)
{
SReplica
*
pReplica
=
&
pOption
->
replicas
[
i
];
pReplica
->
id
=
p
Req
->
replicas
[
i
].
id
;
pReplica
->
port
=
p
Req
->
replicas
[
i
].
port
;
memcpy
(
pReplica
->
fqdn
,
p
Req
->
replicas
[
i
].
fqdn
,
TSDB_FQDN_LEN
);
pReplica
->
id
=
p
Create
->
replicas
[
i
].
id
;
pReplica
->
port
=
p
Create
->
replicas
[
i
].
port
;
memcpy
(
pReplica
->
fqdn
,
p
Create
->
replicas
[
i
].
fqdn
,
TSDB_FQDN_LEN
);
if
(
pReplica
->
id
==
pOption
->
dnodeId
)
{
pOption
->
selfIndex
=
i
;
}
}
if
(
pOption
->
selfIndex
==
-
1
)
{
terrno
=
TSDB_CODE_DND_MNODE_ID_NOT_FOUND
;
dError
(
"failed to build mnode options since %s"
,
terrstr
());
return
-
1
;
}
...
...
@@ -423,8 +422,8 @@ static int32_t dndDropMnode(SDnode *pDnode) {
return
0
;
}
static
SDCreateMnode
Msg
*
dndParseCreateMnodeReq
(
SRpcMsg
*
pReq
)
{
SDCreateMnode
Msg
*
pCreate
=
pReq
->
pCont
;
static
SDCreateMnode
Req
*
dndParseCreateMnodeReq
(
SRpcMsg
*
pReq
)
{
SDCreateMnode
Req
*
pCreate
=
pReq
->
pCont
;
pCreate
->
dnodeId
=
htonl
(
pCreate
->
dnodeId
);
for
(
int32_t
i
=
0
;
i
<
pCreate
->
replica
;
++
i
)
{
pCreate
->
replicas
[
i
].
id
=
htonl
(
pCreate
->
replicas
[
i
].
id
);
...
...
@@ -435,51 +434,74 @@ static SDCreateMnodeMsg *dndParseCreateMnodeReq(SRpcMsg *pReq) {
}
int32_t
dndProcessCreateMnodeReq
(
SDnode
*
pDnode
,
SRpcMsg
*
pReq
)
{
SDCreateMnode
Msg
*
pCreate
=
dndParseCreateMnodeReq
(
pReq
);
SDCreateMnode
Req
*
pCreate
=
dndParseCreateMnodeReq
(
pReq
);
if
(
pCreate
->
dnodeId
!=
dndGetDnodeId
(
pDnode
))
{
terrno
=
TSDB_CODE_DND_MNODE_I
D_INVALID
;
if
(
pCreate
->
replica
<=
1
||
pCreate
->
dnodeId
!=
dndGetDnodeId
(
pDnode
))
{
terrno
=
TSDB_CODE_DND_MNODE_I
NVALID_OPTION
;
return
-
1
;
}
else
{
SMnodeOpt
option
=
{
0
};
if
(
dndBuildMnodeOptionFromReq
(
pDnode
,
&
option
,
pCreate
)
!=
0
)
{
return
-
1
;
}
}
return
dndOpenMnode
(
pDnode
,
&
option
);
SMnodeOpt
option
=
{
0
};
if
(
dndBuildMnodeOptionFromReq
(
pDnode
,
&
option
,
pCreate
)
!=
0
)
{
terrno
=
TSDB_CODE_DND_MNODE_INVALID_OPTION
;
return
-
1
;
}
SMnode
*
pMnode
=
dndAcquireMnode
(
pDnode
);
if
(
pMnode
!=
NULL
)
{
dndReleaseMnode
(
pDnode
,
pMnode
);
terrno
=
TSDB_CODE_DND_MNODE_ALREADY_DEPLOYED
;
return
-
1
;
}
return
dndOpenMnode
(
pDnode
,
&
option
);
}
int32_t
dndProcessAlterMnodeReq
(
SDnode
*
pDnode
,
SRpcMsg
*
pReq
)
{
SDAlterMnode
Msg
*
pAlter
=
dndParseCreateMnodeReq
(
pReq
);
SDAlterMnode
Req
*
pAlter
=
dndParseCreateMnodeReq
(
pReq
);
if
(
pAlter
->
dnodeId
!=
dndGetDnodeId
(
pDnode
))
{
terrno
=
TSDB_CODE_DND_MNODE_I
D_INVALID
;
terrno
=
TSDB_CODE_DND_MNODE_I
NVALID_OPTION
;
return
-
1
;
}
SMnodeOpt
option
=
{
0
};
if
(
dndBuildMnodeOptionFromReq
(
pDnode
,
&
option
,
pAlter
)
!=
0
)
{
terrno
=
TSDB_CODE_DND_MNODE_INVALID_OPTION
;
return
-
1
;
}
if
(
dndAlterMnode
(
pDnode
,
&
option
)
!=
0
)
{
SMnode
*
pMnode
=
dndAcquireMnode
(
pDnode
);
if
(
pMnode
==
NULL
)
{
terrno
=
TSDB_CODE_DND_MNODE_NOT_DEPLOYED
;
return
-
1
;
}
return
dndWriteMnodeFile
(
pDnode
);
int32_t
code
=
dndAlterMnode
(
pDnode
,
&
option
);
dndReleaseMnode
(
pDnode
,
pMnode
);
return
code
;
}
int32_t
dndProcessDropMnodeReq
(
SDnode
*
pDnode
,
SRpcMsg
*
pReq
)
{
SDDropMnode
Msg
*
pDrop
=
pReq
->
pCont
;
SDDropMnode
Req
*
pDrop
=
pReq
->
pCont
;
pDrop
->
dnodeId
=
htonl
(
pDrop
->
dnodeId
);
if
(
pDrop
->
dnodeId
!=
dndGetDnodeId
(
pDnode
))
{
terrno
=
TSDB_CODE_DND_MNODE_ID_INVALID
;
terrno
=
TSDB_CODE_DND_MNODE_INVALID_OPTION
;
return
-
1
;
}
SMnode
*
pMnode
=
dndAcquireMnode
(
pDnode
);
if
(
pMnode
!=
NULL
)
{
terrno
=
TSDB_CODE_DND_MNODE_NOT_DEPLOYED
;
return
-
1
;
}
else
{
return
dndDropMnode
(
pDnode
);
}
int32_t
code
=
dndDropMnode
(
pDnode
);
dndReleaseMnode
(
pDnode
,
pMnode
);
return
code
;
}
static
void
dndProcessMnodeQueue
(
SDnode
*
pDnode
,
SMnodeMsg
*
pMsg
)
{
...
...
@@ -506,6 +528,7 @@ static void dndWriteMnodeMsgToWorker(SDnode *pDnode, SDnodeWorker *pWorker, SRpc
code
=
TSDB_CODE_OUT_OF_MEMORY
;
}
else
{
code
=
dndWriteMsgToWorker
(
pWorker
,
pMsg
,
0
);
if
(
code
!=
0
)
code
=
terrno
;
}
if
(
code
!=
0
)
{
...
...
source/dnode/mgmt/impl/src/dndQnode.c
浏览文件 @
2164fc3f
...
...
@@ -274,7 +274,7 @@ int32_t dndProcessCreateQnodeReq(SDnode *pDnode, SRpcMsg *pRpcMsg) {
pMsg
->
dnodeId
=
htonl
(
pMsg
->
dnodeId
);
if
(
pMsg
->
dnodeId
!=
dndGetDnodeId
(
pDnode
))
{
terrno
=
TSDB_CODE_DND_QNODE_I
D_INVALID
;
terrno
=
TSDB_CODE_DND_QNODE_I
NVALID_OPTION
;
dError
(
"failed to create qnode since %s"
,
terrstr
());
return
-
1
;
}
else
{
...
...
@@ -287,7 +287,7 @@ int32_t dndProcessDropQnodeReq(SDnode *pDnode, SRpcMsg *pRpcMsg) {
pMsg
->
dnodeId
=
htonl
(
pMsg
->
dnodeId
);
if
(
pMsg
->
dnodeId
!=
dndGetDnodeId
(
pDnode
))
{
terrno
=
TSDB_CODE_DND_QNODE_I
D_INVALID
;
terrno
=
TSDB_CODE_DND_QNODE_I
NVALID_OPTION
;
dError
(
"failed to drop qnode since %s"
,
terrstr
());
return
-
1
;
}
else
{
...
...
source/dnode/mgmt/impl/src/dndSnode.c
浏览文件 @
2164fc3f
...
...
@@ -268,7 +268,7 @@ int32_t dndProcessCreateSnodeReq(SDnode *pDnode, SRpcMsg *pRpcMsg) {
pMsg
->
dnodeId
=
htonl
(
pMsg
->
dnodeId
);
if
(
pMsg
->
dnodeId
!=
dndGetDnodeId
(
pDnode
))
{
terrno
=
TSDB_CODE_DND_SNODE_I
D_INVALID
;
terrno
=
TSDB_CODE_DND_SNODE_I
NVALID_OPTION
;
dError
(
"failed to create snode since %s"
,
terrstr
());
return
-
1
;
}
else
{
...
...
@@ -281,7 +281,7 @@ int32_t dndProcessDropSnodeReq(SDnode *pDnode, SRpcMsg *pRpcMsg) {
pMsg
->
dnodeId
=
htonl
(
pMsg
->
dnodeId
);
if
(
pMsg
->
dnodeId
!=
dndGetDnodeId
(
pDnode
))
{
terrno
=
TSDB_CODE_DND_SNODE_I
D_INVALID
;
terrno
=
TSDB_CODE_DND_SNODE_I
NVALID_OPTION
;
dError
(
"failed to drop snode since %s"
,
terrstr
());
return
-
1
;
}
else
{
...
...
source/dnode/mgmt/impl/test/bnode/dbnode.cpp
浏览文件 @
2164fc3f
...
...
@@ -34,7 +34,7 @@ TEST_F(DndTestBnode, 01_Create_Bnode) {
SRpcMsg
*
pRsp
=
test
.
SendReq
(
TDMT_DND_CREATE_BNODE
,
pReq
,
contLen
);
ASSERT_NE
(
pRsp
,
nullptr
);
ASSERT_EQ
(
pRsp
->
code
,
TSDB_CODE_DND_BNODE_I
D_INVALID
);
ASSERT_EQ
(
pRsp
->
code
,
TSDB_CODE_DND_BNODE_I
NVALID_OPTION
);
}
{
...
...
@@ -82,7 +82,7 @@ TEST_F(DndTestBnode, 01_Drop_Bnode) {
SRpcMsg
*
pRsp
=
test
.
SendReq
(
TDMT_DND_DROP_BNODE
,
pReq
,
contLen
);
ASSERT_NE
(
pRsp
,
nullptr
);
ASSERT_EQ
(
pRsp
->
code
,
TSDB_CODE_DND_BNODE_I
D_INVALID
);
ASSERT_EQ
(
pRsp
->
code
,
TSDB_CODE_DND_BNODE_I
NVALID_OPTION
);
}
{
...
...
source/dnode/mgmt/impl/test/mnode/qmnode.cpp
浏览文件 @
2164fc3f
...
...
@@ -13,67 +13,136 @@
class
DndTestMnode
:
public
::
testing
::
Test
{
protected:
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/dnode_test_mnode"
,
9113
);
}
static
void
TearDownTestSuite
()
{
test
.
Cleanup
();
}
static
void
SetUpTestSuite
()
{
test
.
Init
(
"/tmp/dnode_test_mnode"
,
9113
);
const
char
*
fqdn
=
"localhost"
;
const
char
*
firstEp
=
"localhost:9113"
;
static
Testbase
test
;
server2
.
Start
(
"/tmp/dnode_test_mnode2"
,
fqdn
,
9114
,
firstEp
);
}
static
void
TearDownTestSuite
()
{
server2
.
Stop
();
test
.
Cleanup
();
}
static
Testbase
test
;
static
TestServer
server2
;
public:
void
SetUp
()
override
{}
void
TearDown
()
override
{}
};
Testbase
DndTestMnode
::
test
;
#if 0
TEST_F(DndTestMnode, 01_Create_Mnode) {
{
int32_t contLen = sizeof(SDCreateMnodeReq);
SDCreateMnodeReq* pReq = (SDCreateMnodeReq*)rpcMallocCont(contLen);
pReq->dnodeId = htonl(2);
SRpcMsg* pRsp = test.SendReq(TDMT_DND_CREATE_MNODE, pReq, contLen);
ASSERT_NE(pRsp, nullptr);
ASSERT_EQ(pRsp->code, TSDB_CODE_DND_MNODE_ID_INVALID);
}
Testbase
DndTestMnode
::
test
;
TestServer
DndTestMnode
::
server2
;
{
int32_t contLen = sizeof(SDCreateM
nodeReq);
TEST_F
(
DndTestMnode
,
01
_Create_Dnode
)
{
int32_t
contLen
=
sizeof
(
SCreateD
nodeReq
);
SDCreateMnodeReq* pReq = (SDCreateMnodeReq*)rpcMallocCont(contLen);
pReq->dnodeId = htonl(1);
SCreateDnodeReq
*
pReq
=
(
SCreateDnodeReq
*
)
rpcMallocCont
(
contLen
);
strcpy
(
pReq
->
fqdn
,
"localhost"
);
pReq
->
port
=
htonl
(
9114
);
SRpcMsg* pRsp = test.SendReq(TDMT_DND_CREATE_MNODE, pReq, contLen);
ASSERT_NE(pRsp, nullptr);
ASSERT_EQ(pRsp->code, 0);
}
SRpcMsg
*
pRsp
=
test
.
SendReq
(
TDMT_MND_CREATE_DNODE
,
pReq
,
contLen
);
ASSERT_NE
(
pRsp
,
nullptr
);
ASSERT_EQ
(
pRsp
->
code
,
0
);
{
int32_t contLen = sizeof(SDCreateMnodeReq);
SDCreateMnodeReq* pReq = (SDCreateMnodeReq*)rpcMallocCont(contLen);
pReq->dnodeId = htonl(1);
SRpcMsg* pRsp = test.SendReq(TDMT_DND_CREATE_MNODE, pReq, contLen);
ASSERT_NE(pRsp, nullptr);
ASSERT_EQ(pRsp->code, TSDB_CODE_DND_MNODE_ALREADY_DEPLOYED);
}
test.Restart();
{
int32_t contLen = sizeof(SDCreateMnodeReq);
SDCreateMnodeReq* pReq = (SDCreateMnodeReq*)rpcMallocCont(contLen);
pReq->dnodeId = htonl(1);
taosMsleep
(
1300
);
test
.
SendShowMetaReq
(
TSDB_MGMT_TABLE_DNODE
,
""
);
test
.
SendShowRetrieveReq
();
EXPECT_EQ
(
test
.
GetShowRows
(),
2
);
}
SRpcMsg* pRsp = test.SendReq(TDMT_DND_CREATE_MNODE, pReq, contLen);
ASSERT_NE(pRsp, nullptr);
ASSERT_EQ(pRsp->code, TSDB_CODE_DND_MNODE_ALREADY_DEPLOYED);
}
TEST_F
(
DndTestMnode
,
01
_Create_Mnode
)
{
// {
// int32_t contLen = sizeof(SDCreateMnodeReq);
// SDCreateMnodeReq* pReq = (SDCreateMnodeReq*)rpcMallocCont(contLen);
// pReq->dnodeId = htonl(2);
// pReq->replica = 1;
// pReq->replicas[0].id = htonl(1);
// pReq->replicas[0].port = htonl(9113);
// strcpy(pReq->replicas[0].fqdn, "localhost");
// SRpcMsg* pRsp = test.SendReq(TDMT_DND_CREATE_MNODE, pReq, contLen);
// ASSERT_NE(pRsp, nullptr);
// ASSERT_EQ(pRsp->code, TSDB_CODE_DND_MNODE_ID_INVALID);
// }
// {
// int32_t contLen = sizeof(SDCreateMnodeReq);
// SDCreateMnodeReq* pReq = (SDCreateMnodeReq*)rpcMallocCont(contLen);
// pReq->dnodeId = htonl(1);
// pReq->replica = 1;
// pReq->replicas[0].id = htonl(2);
// pReq->replicas[0].port = htonl(9113);
// strcpy(pReq->replicas[0].fqdn, "localhost");
// SRpcMsg* pRsp = test.SendReq(TDMT_DND_CREATE_MNODE, pReq, contLen);
// ASSERT_NE(pRsp, nullptr);
// ASSERT_EQ(pRsp->code, TSDB_CODE_DND_MNODE_ID_NOT_FOUND);
// }
// {
// int32_t contLen = sizeof(SDCreateMnodeReq);
// SDCreateMnodeReq* pReq = (SDCreateMnodeReq*)rpcMallocCont(contLen);
// pReq->dnodeId = htonl(1);
// pReq->replica = 1;
// pReq->replicas[0].id = htonl(1);
// pReq->replicas[0].port = htonl(9113);
// strcpy(pReq->replicas[0].fqdn, "localhost");
// SRpcMsg* pRsp = test.SendReq(TDMT_DND_CREATE_MNODE, pReq, contLen);
// ASSERT_NE(pRsp, nullptr);
// ASSERT_EQ(pRsp->code, TSDB_CODE_DND_MNODE_ALREADY_DEPLOYED);
// }
// {
// int32_t contLen = sizeof(SDCreateMnodeReq);
// SDCreateMnodeReq* pReq = (SDCreateMnodeReq*)rpcMallocCont(contLen);
// pReq->dnodeId = htonl(1);
// pReq->replica = 2;
// pReq->replicas[0].id = htonl(1);
// pReq->replicas[0].port = htonl(9113);
// pReq->replicas[0].id = htonl(1);
// pReq->replicas[0].port = htonl(9113);
// strcpy(pReq->replicas[0].fqdn, "localhost");
// SRpcMsg* pRsp = test.SendReq(TDMT_DND_CREATE_MNODE, pReq, contLen);
// ASSERT_NE(pRsp, nullptr);
// ASSERT_EQ(pRsp->code, 0);
// }
// {
// int32_t contLen = sizeof(SDCreateMnodeReq);
// SDCreateMnodeReq* pReq = (SDCreateMnodeReq*)rpcMallocCont(contLen);
// pReq->dnodeId = htonl(1);
// SRpcMsg* pRsp = test.SendReq(TDMT_DND_CREATE_MNODE, pReq, contLen);
// ASSERT_NE(pRsp, nullptr);
// ASSERT_EQ(pRsp->code, TSDB_CODE_DND_MNODE_ALREADY_DEPLOYED);
// }
// test.Restart();
// {
// int32_t contLen = sizeof(SDCreateMnodeReq);
// SDCreateMnodeReq* pReq = (SDCreateMnodeReq*)rpcMallocCont(contLen);
// pReq->dnodeId = htonl(1);
// SRpcMsg* pRsp = test.SendReq(TDMT_DND_CREATE_MNODE, pReq, contLen);
// ASSERT_NE(pRsp, nullptr);
// ASSERT_EQ(pRsp->code, TSDB_CODE_DND_MNODE_ALREADY_DEPLOYED);
// }
}
#if 0
TEST_F(DndTestMnode, 02_Alter_Mnode) {
{
int32_t contLen = sizeof(SDCreateMnodeReq);
...
...
@@ -122,6 +191,7 @@ TEST_F(DndTestMnode, 02_Alter_Mnode) {
}
}
TEST_F(DndTestMnode, 03_Drop_Mnode) {
{
int32_t contLen = sizeof(SDDropMnodeReq);
...
...
source/dnode/mgmt/impl/test/qnode/dqnode.cpp
浏览文件 @
2164fc3f
...
...
@@ -34,7 +34,7 @@ TEST_F(DndTestQnode, 01_Create_Qnode) {
SRpcMsg
*
pRsp
=
test
.
SendReq
(
TDMT_DND_CREATE_QNODE
,
pReq
,
contLen
);
ASSERT_NE
(
pRsp
,
nullptr
);
ASSERT_EQ
(
pRsp
->
code
,
TSDB_CODE_DND_QNODE_I
D_INVALID
);
ASSERT_EQ
(
pRsp
->
code
,
TSDB_CODE_DND_QNODE_I
NVALID_OPTION
);
}
{
...
...
@@ -82,7 +82,7 @@ TEST_F(DndTestQnode, 02_Drop_Qnode) {
SRpcMsg
*
pRsp
=
test
.
SendReq
(
TDMT_DND_DROP_QNODE
,
pReq
,
contLen
);
ASSERT_NE
(
pRsp
,
nullptr
);
ASSERT_EQ
(
pRsp
->
code
,
TSDB_CODE_DND_QNODE_I
D_INVALID
);
ASSERT_EQ
(
pRsp
->
code
,
TSDB_CODE_DND_QNODE_I
NVALID_OPTION
);
}
{
...
...
source/dnode/mgmt/impl/test/snode/dsnode.cpp
浏览文件 @
2164fc3f
...
...
@@ -34,7 +34,7 @@ TEST_F(DndTestSnode, 01_Create_Snode) {
SRpcMsg
*
pRsp
=
test
.
SendReq
(
TDMT_DND_CREATE_SNODE
,
pReq
,
contLen
);
ASSERT_NE
(
pRsp
,
nullptr
);
ASSERT_EQ
(
pRsp
->
code
,
TSDB_CODE_DND_SNODE_I
D_INVALID
);
ASSERT_EQ
(
pRsp
->
code
,
TSDB_CODE_DND_SNODE_I
NVALID_OPTION
);
}
{
...
...
@@ -82,7 +82,7 @@ TEST_F(DndTestSnode, 01_Drop_Snode) {
SRpcMsg
*
pRsp
=
test
.
SendReq
(
TDMT_DND_DROP_SNODE
,
pReq
,
contLen
);
ASSERT_NE
(
pRsp
,
nullptr
);
ASSERT_EQ
(
pRsp
->
code
,
TSDB_CODE_DND_SNODE_I
D_INVALID
);
ASSERT_EQ
(
pRsp
->
code
,
TSDB_CODE_DND_SNODE_I
NVALID_OPTION
);
}
{
...
...
source/dnode/mnode/impl/src/mndMnode.c
浏览文件 @
2164fc3f
...
...
@@ -277,7 +277,7 @@ static int32_t mndSetCreateMnodeRedoActions(SMnode *pMnode, STrans *pTrans, SDno
void
*
pIter
=
NULL
;
int32_t
numOfReplicas
=
0
;
SDCreateMnode
Msg
createMsg
=
{
0
};
SDCreateMnode
Req
createMsg
=
{
0
};
while
(
1
)
{
SMnodeObj
*
pMObj
=
NULL
;
pIter
=
sdbFetch
(
pSdb
,
SDB_MNODE
,
pIter
,
(
void
**
)
&
pMObj
);
...
...
@@ -307,18 +307,18 @@ static int32_t mndSetCreateMnodeRedoActions(SMnode *pMnode, STrans *pTrans, SDno
STransAction
action
=
{
0
};
SDAlterMnode
Msg
*
pMsg
=
malloc
(
sizeof
(
SDAlterMnodeMsg
));
SDAlterMnode
Req
*
pMsg
=
malloc
(
sizeof
(
SDAlterMnodeReq
));
if
(
pMsg
==
NULL
)
{
sdbCancelFetch
(
pSdb
,
pIter
);
sdbRelease
(
pSdb
,
pMObj
);
return
-
1
;
}
memcpy
(
pMsg
,
&
createMsg
,
sizeof
(
SDAlterMnode
Msg
));
memcpy
(
pMsg
,
&
createMsg
,
sizeof
(
SDAlterMnode
Req
));
pMsg
->
dnodeId
=
htonl
(
pMObj
->
id
);
action
.
epSet
=
mndGetDnodeEpset
(
pMObj
->
pDnode
);
action
.
pCont
=
pMsg
;
action
.
contLen
=
sizeof
(
SDAlterMnode
Msg
);
action
.
contLen
=
sizeof
(
SDAlterMnode
Req
);
action
.
msgType
=
TDMT_DND_ALTER_MNODE
;
if
(
mndTransAppendRedoAction
(
pTrans
,
&
action
)
!=
0
)
{
...
...
@@ -335,14 +335,14 @@ static int32_t mndSetCreateMnodeRedoActions(SMnode *pMnode, STrans *pTrans, SDno
STransAction
action
=
{
0
};
action
.
epSet
=
mndGetDnodeEpset
(
pDnode
);
SDCreateMnode
Msg
*
pMsg
=
malloc
(
sizeof
(
SDCreateMnodeMsg
));
SDCreateMnode
Req
*
pMsg
=
malloc
(
sizeof
(
SDCreateMnodeReq
));
if
(
pMsg
==
NULL
)
return
-
1
;
memcpy
(
pMsg
,
&
createMsg
,
sizeof
(
SDAlterMnode
Msg
));
memcpy
(
pMsg
,
&
createMsg
,
sizeof
(
SDAlterMnode
Req
));
pMsg
->
dnodeId
=
htonl
(
pObj
->
id
);
action
.
epSet
=
mndGetDnodeEpset
(
pDnode
);
action
.
pCont
=
pMsg
;
action
.
contLen
=
sizeof
(
SDCreateMnode
Msg
);
action
.
contLen
=
sizeof
(
SDCreateMnode
Req
);
action
.
msgType
=
TDMT_DND_CREATE_MNODE
;
if
(
mndTransAppendRedoAction
(
pTrans
,
&
action
)
!=
0
)
{
free
(
pMsg
);
...
...
@@ -353,7 +353,7 @@ static int32_t mndSetCreateMnodeRedoActions(SMnode *pMnode, STrans *pTrans, SDno
return
0
;
}
static
int32_t
mndCreateMnode
(
SMnode
*
pMnode
,
SMnodeMsg
*
pMsg
,
SDnodeObj
*
pDnode
,
SMCreateMnode
Msg
*
pCreate
)
{
static
int32_t
mndCreateMnode
(
SMnode
*
pMnode
,
SMnodeMsg
*
pMsg
,
SDnodeObj
*
pDnode
,
SMCreateMnode
Req
*
pCreate
)
{
SMnodeObj
mnodeObj
=
{
0
};
mnodeObj
.
id
=
pDnode
->
id
;
mnodeObj
.
createdTime
=
taosGetTimestampMs
();
...
...
@@ -396,7 +396,7 @@ CREATE_MNODE_OVER:
static
int32_t
mndProcessCreateMnodeReq
(
SMnodeMsg
*
pMsg
)
{
SMnode
*
pMnode
=
pMsg
->
pMnode
;
SMCreateMnode
Msg
*
pCreate
=
pMsg
->
rpcMsg
.
pCont
;
SMCreateMnode
Req
*
pCreate
=
pMsg
->
rpcMsg
.
pCont
;
pCreate
->
dnodeId
=
htonl
(
pCreate
->
dnodeId
);
...
...
@@ -449,7 +449,7 @@ static int32_t mndSetDropMnodeRedoActions(SMnode *pMnode, STrans *pTrans, SDnode
void
*
pIter
=
NULL
;
int32_t
numOfReplicas
=
0
;
SDAlterMnode
Msg
alterMsg
=
{
0
};
SDAlterMnode
Req
alterMsg
=
{
0
};
while
(
1
)
{
SMnodeObj
*
pMObj
=
NULL
;
pIter
=
sdbFetch
(
pSdb
,
SDB_MNODE
,
pIter
,
(
void
**
)
&
pMObj
);
...
...
@@ -475,18 +475,18 @@ static int32_t mndSetDropMnodeRedoActions(SMnode *pMnode, STrans *pTrans, SDnode
if
(
pMObj
->
id
!=
pObj
->
id
)
{
STransAction
action
=
{
0
};
SDAlterMnode
Msg
*
pMsg
=
malloc
(
sizeof
(
SDAlterMnodeMsg
));
SDAlterMnode
Req
*
pMsg
=
malloc
(
sizeof
(
SDAlterMnodeReq
));
if
(
pMsg
==
NULL
)
{
sdbCancelFetch
(
pSdb
,
pIter
);
sdbRelease
(
pSdb
,
pMObj
);
return
-
1
;
}
memcpy
(
pMsg
,
&
alterMsg
,
sizeof
(
SDAlterMnode
Msg
));
memcpy
(
pMsg
,
&
alterMsg
,
sizeof
(
SDAlterMnode
Req
));
pMsg
->
dnodeId
=
htonl
(
pMObj
->
id
);
action
.
epSet
=
mndGetDnodeEpset
(
pMObj
->
pDnode
);
action
.
pCont
=
pMsg
;
action
.
contLen
=
sizeof
(
SDAlterMnode
Msg
);
action
.
contLen
=
sizeof
(
SDAlterMnode
Req
);
action
.
msgType
=
TDMT_DND_ALTER_MNODE
;
if
(
mndTransAppendRedoAction
(
pTrans
,
&
action
)
!=
0
)
{
...
...
@@ -504,7 +504,7 @@ static int32_t mndSetDropMnodeRedoActions(SMnode *pMnode, STrans *pTrans, SDnode
STransAction
action
=
{
0
};
action
.
epSet
=
mndGetDnodeEpset
(
pDnode
);
SDDropMnode
Msg
*
pMsg
=
malloc
(
sizeof
(
SDDropMnodeMsg
));
SDDropMnode
Req
*
pMsg
=
malloc
(
sizeof
(
SDDropMnodeReq
));
if
(
pMsg
==
NULL
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
return
-
1
;
...
...
@@ -513,7 +513,7 @@ static int32_t mndSetDropMnodeRedoActions(SMnode *pMnode, STrans *pTrans, SDnode
action
.
epSet
=
mndGetDnodeEpset
(
pDnode
);
action
.
pCont
=
pMsg
;
action
.
contLen
=
sizeof
(
SDDropMnode
Msg
);
action
.
contLen
=
sizeof
(
SDDropMnode
Req
);
action
.
msgType
=
TDMT_DND_DROP_MNODE
;
if
(
mndTransAppendRedoAction
(
pTrans
,
&
action
)
!=
0
)
{
free
(
pMsg
);
...
...
@@ -563,7 +563,7 @@ DROP_MNODE_OVER:
static
int32_t
mndProcessDropMnodeReq
(
SMnodeMsg
*
pMsg
)
{
SMnode
*
pMnode
=
pMsg
->
pMnode
;
SMDropMnode
Msg
*
pDrop
=
pMsg
->
rpcMsg
.
pCont
;
SMDropMnode
Req
*
pDrop
=
pMsg
->
rpcMsg
.
pCont
;
pDrop
->
dnodeId
=
htonl
(
pDrop
->
dnodeId
);
mDebug
(
"mnode:%d, start to drop"
,
pDrop
->
dnodeId
);
...
...
source/dnode/mnode/impl/test/mnode/mnode.cpp
浏览文件 @
2164fc3f
...
...
@@ -72,9 +72,9 @@ TEST_F(MndTestMnode, 01_ShowDnode) {
TEST_F
(
MndTestMnode
,
02
_Create_Mnode_Invalid_Id
)
{
{
int32_t
contLen
=
sizeof
(
SMCreateMnode
Msg
);
int32_t
contLen
=
sizeof
(
SMCreateMnode
Req
);
SMCreateMnode
Msg
*
pReq
=
(
SMCreateMnodeMsg
*
)
rpcMallocCont
(
contLen
);
SMCreateMnode
Req
*
pReq
=
(
SMCreateMnodeReq
*
)
rpcMallocCont
(
contLen
);
pReq
->
dnodeId
=
htonl
(
1
);
SRpcMsg
*
pRsp
=
test
.
SendReq
(
TDMT_MND_CREATE_MNODE
,
pReq
,
contLen
);
...
...
@@ -85,9 +85,9 @@ TEST_F(MndTestMnode, 02_Create_Mnode_Invalid_Id) {
TEST_F
(
MndTestMnode
,
03
_Create_Mnode_Invalid_Id
)
{
{
int32_t
contLen
=
sizeof
(
SMCreateMnode
Msg
);
int32_t
contLen
=
sizeof
(
SMCreateMnode
Req
);
SMCreateMnode
Msg
*
pReq
=
(
SMCreateMnodeMsg
*
)
rpcMallocCont
(
contLen
);
SMCreateMnode
Req
*
pReq
=
(
SMCreateMnodeReq
*
)
rpcMallocCont
(
contLen
);
pReq
->
dnodeId
=
htonl
(
2
);
SRpcMsg
*
pRsp
=
test
.
SendReq
(
TDMT_MND_CREATE_MNODE
,
pReq
,
contLen
);
...
...
@@ -117,9 +117,9 @@ TEST_F(MndTestMnode, 04_Create_Mnode) {
{
// create mnode
int32_t
contLen
=
sizeof
(
SMCreateMnode
Msg
);
int32_t
contLen
=
sizeof
(
SMCreateMnode
Req
);
SMCreateMnode
Msg
*
pReq
=
(
SMCreateMnodeMsg
*
)
rpcMallocCont
(
contLen
);
SMCreateMnode
Req
*
pReq
=
(
SMCreateMnodeReq
*
)
rpcMallocCont
(
contLen
);
pReq
->
dnodeId
=
htonl
(
2
);
SRpcMsg
*
pRsp
=
test
.
SendReq
(
TDMT_MND_CREATE_MNODE
,
pReq
,
contLen
);
...
...
@@ -144,9 +144,9 @@ TEST_F(MndTestMnode, 04_Create_Mnode) {
{
// drop mnode
int32_t
contLen
=
sizeof
(
SMDropMnode
Msg
);
int32_t
contLen
=
sizeof
(
SMDropMnode
Req
);
SMDropMnode
Msg
*
pReq
=
(
SMDropMnodeMsg
*
)
rpcMallocCont
(
contLen
);
SMDropMnode
Req
*
pReq
=
(
SMDropMnodeReq
*
)
rpcMallocCont
(
contLen
);
pReq
->
dnodeId
=
htonl
(
2
);
SRpcMsg
*
pRsp
=
test
.
SendReq
(
TDMT_MND_DROP_MNODE
,
pReq
,
contLen
);
...
...
source/util/src/terror.c
浏览文件 @
2164fc3f
...
...
@@ -259,26 +259,22 @@ TAOS_DEFINE_ERROR(TSDB_CODE_DND_DNODE_READ_FILE_ERROR, "Read dnode.json error
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_DNODE_WRITE_FILE_ERROR
,
"Write dnode.json error"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_MNODE_ALREADY_DEPLOYED
,
"Mnode already deployed"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_MNODE_NOT_DEPLOYED
,
"Mnode not deployed"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_MNODE_ID_INVALID
,
"Mnode Id invalid"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_MNODE_ID_NOT_FOUND
,
"Mnode Id not found"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_MNODE_INVALID_OPTION
,
"Mnode option invalid"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_MNODE_READ_FILE_ERROR
,
"Read mnode.json error"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_MNODE_WRITE_FILE_ERROR
,
"Write mnode.json error"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_QNODE_ALREADY_DEPLOYED
,
"Qnode already deployed"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_QNODE_NOT_DEPLOYED
,
"Qnode not deployed"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_QNODE_ID_INVALID
,
"Qnode Id invalid"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_QNODE_ID_NOT_FOUND
,
"Qnode Id not found"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_QNODE_INVALID_OPTION
,
"Qnode option invalid"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_QNODE_READ_FILE_ERROR
,
"Read qnode.json error"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_QNODE_WRITE_FILE_ERROR
,
"Write qnode.json error"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_SNODE_ALREADY_DEPLOYED
,
"Snode already deployed"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_SNODE_NOT_DEPLOYED
,
"Snode not deployed"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_SNODE_ID_INVALID
,
"Snode Id invalid"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_SNODE_ID_NOT_FOUND
,
"Snode Id not found"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_SNODE_INVALID_OPTION
,
"Snode option invalid"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_SNODE_READ_FILE_ERROR
,
"Read snode.json error"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_SNODE_WRITE_FILE_ERROR
,
"Write snode.json error"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_BNODE_ALREADY_DEPLOYED
,
"Bnode already deployed"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_BNODE_NOT_DEPLOYED
,
"Bnode not deployed"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_BNODE_ID_INVALID
,
"Bnode Id invalid"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_BNODE_ID_NOT_FOUND
,
"Bnode Id not found"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_BNODE_INVALID_OPTION
,
"Bnode option invalid"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_BNODE_READ_FILE_ERROR
,
"Read bnode.json error"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_BNODE_WRITE_FILE_ERROR
,
"Write bnode.json error"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_VNODE_TOO_MANY_VNODES
,
"Too many vnode directories"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录