Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c31dc877
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
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看板
提交
c31dc877
编写于
12月 28, 2021
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix drop dnode errors
上级
9748f4be
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
13 addition
and
13 deletion
+13
-13
include/common/tmsg.h
include/common/tmsg.h
+0
-2
source/dnode/mgmt/impl/src/dndDnode.c
source/dnode/mgmt/impl/src/dndDnode.c
+13
-10
source/dnode/mnode/impl/src/mndDnode.c
source/dnode/mnode/impl/src/mndDnode.c
+0
-1
未找到文件。
include/common/tmsg.h
浏览文件 @
c31dc877
...
...
@@ -661,8 +661,6 @@ typedef struct {
typedef
struct
{
int32_t
dnodeId
;
int64_t
clusterId
;
int8_t
dropped
;
char
reserved
[
7
];
}
SDnodeCfg
;
typedef
struct
{
...
...
source/dnode/mgmt/impl/src/dndDnode.c
浏览文件 @
c31dc877
...
...
@@ -393,13 +393,11 @@ void dndSendStatusMsg(SDnode *pDnode) {
static
void
dndUpdateDnodeCfg
(
SDnode
*
pDnode
,
SDnodeCfg
*
pCfg
)
{
SDnodeMgmt
*
pMgmt
=
&
pDnode
->
dmgmt
;
if
(
pMgmt
->
dnodeId
==
0
||
pMgmt
->
dropped
!=
pCfg
->
dropped
)
{
dInfo
(
"set dnodeId:%d clusterId:% "
PRId64
" dropped:%d"
,
pCfg
->
dnodeId
,
pCfg
->
clusterId
,
pCfg
->
dropped
);
if
(
pMgmt
->
dnodeId
==
0
)
{
dInfo
(
"set dnodeId:%d clusterId:% "
PRId64
,
pCfg
->
dnodeId
,
pCfg
->
clusterId
);
taosWLockLatch
(
&
pMgmt
->
latch
);
pMgmt
->
dnodeId
=
pCfg
->
dnodeId
;
pMgmt
->
clusterId
=
pCfg
->
clusterId
;
pMgmt
->
dropped
=
pCfg
->
dropped
;
dndWriteDnodes
(
pDnode
);
taosWUnLockLatch
(
&
pMgmt
->
latch
);
}
...
...
@@ -430,6 +428,11 @@ static void dndProcessStatusRsp(SDnode *pDnode, SRpcMsg *pMsg) {
if
(
pMsg
->
code
!=
TSDB_CODE_SUCCESS
)
{
pMgmt
->
statusSent
=
0
;
if
(
pMsg
->
code
==
TSDB_CODE_MND_DNODE_NOT_EXIST
&&
!
pMgmt
->
dropped
&&
pMgmt
->
dnodeId
>
0
)
{
dInfo
(
"dnode:%d, set to dropped since not exist in mnode"
,
pMgmt
->
dnodeId
);
pMgmt
->
dropped
=
1
;
dndWriteDnodes
(
pDnode
);
}
return
;
}
...
...
@@ -439,11 +442,6 @@ static void dndProcessStatusRsp(SDnode *pDnode, SRpcMsg *pMsg) {
pCfg
->
clusterId
=
htobe64
(
pCfg
->
clusterId
);
dndUpdateDnodeCfg
(
pDnode
,
pCfg
);
if
(
pCfg
->
dropped
)
{
pMgmt
->
statusSent
=
0
;
return
;
}
SDnodeEps
*
pDnodeEps
=
&
pRsp
->
dnodeEps
;
pDnodeEps
->
num
=
htonl
(
pDnodeEps
->
num
);
for
(
int32_t
i
=
0
;
i
<
pDnodeEps
->
num
;
++
i
)
{
...
...
@@ -487,7 +485,7 @@ static void *dnodeThreadRoutine(void *param) {
pthread_testcancel
();
taosMsleep
(
ms
);
if
(
dndGetStat
(
pDnode
)
==
DND_STAT_RUNNING
&&
!
pMgmt
->
statusSent
)
{
if
(
dndGetStat
(
pDnode
)
==
DND_STAT_RUNNING
&&
!
pMgmt
->
statusSent
&&
!
pMgmt
->
dropped
)
{
dndSendStatusMsg
(
pDnode
);
}
}
...
...
@@ -522,6 +520,11 @@ int32_t dndInitDnode(SDnode *pDnode) {
return
-
1
;
}
if
(
pMgmt
->
dropped
)
{
dError
(
"dnode will not start for its already dropped"
);
return
-
1
;
}
if
(
dndInitMgmtWorker
(
pDnode
)
!=
0
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
return
-
1
;
...
...
source/dnode/mnode/impl/src/mndDnode.c
浏览文件 @
c31dc877
...
...
@@ -370,7 +370,6 @@ static int32_t mndProcessStatusMsg(SMnodeMsg *pMsg) {
}
pRsp
->
dnodeCfg
.
dnodeId
=
htonl
(
pDnode
->
id
);
pRsp
->
dnodeCfg
.
dropped
=
0
;
pRsp
->
dnodeCfg
.
clusterId
=
htobe64
(
pMnode
->
clusterId
);
mndGetDnodeData
(
pMnode
,
&
pRsp
->
dnodeEps
,
numOfEps
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录