Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
3b6d196e
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看板
未验证
提交
3b6d196e
编写于
5月 29, 2023
作者:
W
wade zhang
提交者:
GitHub
5月 29, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #21498 from taosdata/fix/check-empty-dnode
check empty dnode
上级
94c3569a
23983e50
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
17 addition
and
17 deletion
+17
-17
source/dnode/mnode/impl/src/mndDnode.c
source/dnode/mnode/impl/src/mndDnode.c
+14
-14
tests/script/tsim/dnode/drop_dnode_has_mnode.sim
tests/script/tsim/dnode/drop_dnode_has_mnode.sim
+1
-1
tests/script/tsim/dnode/offline_reason.sim
tests/script/tsim/dnode/offline_reason.sim
+1
-1
tests/script/tsim/valgrind/checkError1.sim
tests/script/tsim/valgrind/checkError1.sim
+1
-1
未找到文件。
source/dnode/mnode/impl/src/mndDnode.c
浏览文件 @
3b6d196e
...
@@ -986,21 +986,21 @@ static int32_t mndProcessDropDnodeReq(SRpcMsg *pReq) {
...
@@ -986,21 +986,21 @@ static int32_t mndProcessDropDnodeReq(SRpcMsg *pReq) {
}
}
int32_t
numOfVnodes
=
mndGetVnodesNum
(
pMnode
,
pDnode
->
id
);
int32_t
numOfVnodes
=
mndGetVnodesNum
(
pMnode
,
pDnode
->
id
);
if
(
numOfVnodes
>
0
||
pMObj
!=
NULL
||
pSObj
!=
NULL
||
pQObj
!=
NULL
)
{
bool
isonline
=
mndIsDnodeOnline
(
pDnode
,
taosGetTimestampMs
());
bool
isonline
=
mndIsDnodeOnline
(
pDnode
,
taosGetTimestampMs
());
if
(
isonline
&&
force
)
{
if
(
isonline
&&
force
)
{
terrno
=
TSDB_CODE_DNODE_ONLY_USE_WHEN_OFFLINE
;
terrno
=
TSDB_CODE_DNODE_ONLY_USE_WHEN_OFFLINE
;
mError
(
"dnode:%d, failed to drop since %s, vnodes:%d mnode:%d qnode:%d snode:%d"
,
pDnode
->
id
,
terrstr
(),
mError
(
"dnode:%d, failed to drop since %s, vnodes:%d mnode:%d qnode:%d snode:%d"
,
pDnode
->
id
,
terrstr
(),
numOfVnodes
,
pMObj
!=
NULL
,
pQObj
!=
NULL
,
pSObj
!=
NULL
);
numOfVnodes
,
pMObj
!=
NULL
,
pQObj
!=
NULL
,
pSObj
!=
NULL
);
goto
_OVER
;
goto
_OVER
;
}
}
if
(
!
isonline
&&
!
force
)
{
if
(
!
isonline
&&
!
force
)
{
terrno
=
TSDB_CODE_DNODE_OFFLINE
;
terrno
=
TSDB_CODE_DNODE_OFFLINE
;
mError
(
"dnode:%d, failed to drop since %s, vnodes:%d mnode:%d qnode:%d snode:%d"
,
pDnode
->
id
,
terrstr
(),
mError
(
"dnode:%d, failed to drop since %s, vnodes:%d mnode:%d qnode:%d snode:%d"
,
pDnode
->
id
,
terrstr
(),
numOfVnodes
,
pMObj
!=
NULL
,
pQObj
!=
NULL
,
pSObj
!=
NULL
);
numOfVnodes
,
pMObj
!=
NULL
,
pQObj
!=
NULL
,
pSObj
!=
NULL
);
goto
_OVER
;
goto
_OVER
;
}
}
}
code
=
mndDropDnode
(
pMnode
,
pReq
,
pDnode
,
pMObj
,
pQObj
,
pSObj
,
numOfVnodes
,
force
,
dropReq
.
unsafe
);
code
=
mndDropDnode
(
pMnode
,
pReq
,
pDnode
,
pMObj
,
pQObj
,
pSObj
,
numOfVnodes
,
force
,
dropReq
.
unsafe
);
if
(
code
==
0
)
code
=
TSDB_CODE_ACTION_IN_PROGRESS
;
if
(
code
==
0
)
code
=
TSDB_CODE_ACTION_IN_PROGRESS
;
...
...
tests/script/tsim/dnode/drop_dnode_has_mnode.sim
浏览文件 @
3b6d196e
...
@@ -35,7 +35,7 @@ endi
...
@@ -35,7 +35,7 @@ endi
print =============== step2 drop dnode 3
print =============== step2 drop dnode 3
sql_error drop dnode 1
sql_error drop dnode 1
sql drop dnode 3
sql drop dnode 3
force
sql select * from information_schema.ins_dnodes
sql select * from information_schema.ins_dnodes
print ===> $data00 $data01 $data02 $data03 $data04 $data05
print ===> $data00 $data01 $data02 $data03 $data04 $data05
...
...
tests/script/tsim/dnode/offline_reason.sim
浏览文件 @
3b6d196e
...
@@ -57,7 +57,7 @@ if $data(2)[7] != @status msg timeout@ then
...
@@ -57,7 +57,7 @@ if $data(2)[7] != @status msg timeout@ then
endi
endi
print ========== step4
print ========== step4
sql drop dnode 2
sql drop dnode 2
force
sql select * from information_schema.ins_dnodes
sql select * from information_schema.ins_dnodes
if $rows != 1 then
if $rows != 1 then
return -1
return -1
...
...
tests/script/tsim/valgrind/checkError1.sim
浏览文件 @
3b6d196e
...
@@ -20,7 +20,7 @@ sql_error alter user u2 sysinfo 0
...
@@ -20,7 +20,7 @@ sql_error alter user u2 sysinfo 0
print =============== step2 create drop dnode
print =============== step2 create drop dnode
sql create dnode $hostname port 7200
sql create dnode $hostname port 7200
sql create dnode $hostname port 7300
sql create dnode $hostname port 7300
sql drop dnode 3
sql drop dnode 3
force
sql alter dnode 1 'debugflag 131'
sql alter dnode 1 'debugflag 131'
print =============== step3: select * from information_schema.ins_dnodes
print =============== step3: select * from information_schema.ins_dnodes
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录