Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
ffadd16e
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
ffadd16e
编写于
12月 06, 2020
作者:
S
Shengliang Guan
提交者:
GitHub
12月 06, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4462 from taosdata/hotfix/TD-2347
[TD-2347]<fix>: Modify some bugs in data migration and add mandatory check
上级
24c9e98f
9abff317
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
37 addition
and
16 deletion
+37
-16
src/dnode/src/dnodeEps.c
src/dnode/src/dnodeEps.c
+7
-0
src/dnode/src/dnodeMInfos.c
src/dnode/src/dnodeMInfos.c
+19
-8
src/dnode/src/dnodeMain.c
src/dnode/src/dnodeMain.c
+1
-1
src/dnode/src/dnodeMgmt.c
src/dnode/src/dnodeMgmt.c
+6
-1
src/sync/src/syncMain.c
src/sync/src/syncMain.c
+1
-1
src/vnode/src/vnodeCfg.c
src/vnode/src/vnodeCfg.c
+2
-3
src/vnode/src/vnodeMain.c
src/vnode/src/vnodeMain.c
+1
-2
未找到文件。
src/dnode/src/dnodeEps.c
浏览文件 @
ffadd16e
...
...
@@ -236,7 +236,14 @@ PRASE_EPS_OVER:
dnodeResetEps
(
eps
);
if
(
eps
)
free
(
eps
);
#if 0
dnodeUpdateEp(dnodeGetDnodeId(), tsLocalEp, tsLocalFqdn, &tsServerPort);
#else
if
(
dnodeCheckEpChanged
(
dnodeGetDnodeId
(),
tsLocalEp
))
{
dError
(
"dnode:%d, localEp is changed to %s in dnodeEps.json and need reconfigured"
,
dnodeGetDnodeId
(),
tsLocalEp
);
return
-
1
;
}
#endif
terrno
=
0
;
return
0
;
...
...
src/dnode/src/dnodeMInfos.c
浏览文件 @
ffadd16e
...
...
@@ -163,6 +163,7 @@ static int32_t dnodeReadMInfos() {
cJSON
*
root
=
NULL
;
FILE
*
fp
=
NULL
;
SMInfos
minfos
=
{
0
};
bool
nodeChanged
=
false
;
char
file
[
TSDB_FILENAME_LEN
+
20
]
=
{
0
};
sprintf
(
file
,
"%s/mnodeEpSet.json"
,
tsDnodeDir
);
...
...
@@ -221,14 +222,19 @@ static int32_t dnodeReadMInfos() {
dError
(
"failed to read mnodeEpSet.json, nodeId not found"
);
goto
PARSE_MINFOS_OVER
;
}
minfos
.
mnodeInfos
[
i
].
mnodeId
=
nodeId
->
valueint
;
cJSON
*
nodeEp
=
cJSON_GetObjectItem
(
nodeInfo
,
"nodeEp"
);
if
(
!
nodeEp
||
nodeEp
->
type
!=
cJSON_String
||
nodeEp
->
valuestring
==
NULL
)
{
dError
(
"failed to read mnodeEpSet.json, nodeName not found"
);
goto
PARSE_MINFOS_OVER
;
}
strncpy
(
minfos
.
mnodeInfos
[
i
].
mnodeEp
,
nodeEp
->
valuestring
,
TSDB_EP_LEN
);
SMInfo
*
pMinfo
=
&
minfos
.
mnodeInfos
[
i
];
pMinfo
->
mnodeId
=
nodeId
->
valueint
;
tstrncpy
(
pMinfo
->
mnodeEp
,
nodeEp
->
valuestring
,
TSDB_EP_LEN
);
bool
changed
=
dnodeCheckEpChanged
(
pMinfo
->
mnodeId
,
pMinfo
->
mnodeEp
);
if
(
changed
)
nodeChanged
=
changed
;
}
dInfo
(
"read file %s successed"
,
file
);
...
...
@@ -245,6 +251,11 @@ PARSE_MINFOS_OVER:
dnodeUpdateEp
(
mInfo
->
mnodeId
,
mInfo
->
mnodeEp
,
NULL
,
NULL
);
}
dnodeResetMInfos
(
&
minfos
);
if
(
nodeChanged
)
{
dnodeWriteMInfos
();
}
return
0
;
}
...
...
src/dnode/src/dnodeMain.c
浏览文件 @
ffadd16e
...
...
@@ -58,10 +58,10 @@ typedef struct {
static
const
SDnodeComponent
tsDnodeComponents
[]
=
{
{
"tfile"
,
tfInit
,
tfCleanup
},
{
"rpc"
,
rpcInit
,
rpcCleanup
},
{
"globalcfg"
,
taosCheckGlobalCfg
,
NULL
},
{
"storage"
,
dnodeInitStorage
,
dnodeCleanupStorage
},
{
"dnodecfg"
,
dnodeInitCfg
,
dnodeCleanupCfg
},
{
"dnodeeps"
,
dnodeInitEps
,
dnodeCleanupEps
},
{
"globalcfg"
,
taosCheckGlobalCfg
,
NULL
},
{
"mnodeinfos"
,
dnodeInitMInfos
,
dnodeCleanupMInfos
},
{
"wal"
,
walInit
,
walCleanUp
},
{
"check"
,
dnodeInitCheck
,
dnodeCleanupCheck
},
// NOTES: dnodeInitCheck must be behind the dnodeinitStorage component !!!
...
...
src/dnode/src/dnodeMgmt.c
浏览文件 @
ffadd16e
...
...
@@ -339,7 +339,12 @@ static int32_t dnodeOpenVnodes() {
}
free
(
threads
);
dInfo
(
"there are total vnodes:%d, openned:%d failed:%d"
,
numOfVnodes
,
openVnodes
,
failedVnodes
);
dInfo
(
"there are total vnodes:%d, openned:%d"
,
numOfVnodes
,
openVnodes
);
if
(
failedVnodes
!=
0
)
{
dError
(
"there are total vnodes:%d, failed:%d"
,
numOfVnodes
,
failedVnodes
);
return
-
1
;
}
return
TSDB_CODE_SUCCESS
;
}
...
...
src/sync/src/syncMain.c
浏览文件 @
ffadd16e
...
...
@@ -226,7 +226,7 @@ int64_t syncStart(const SSyncInfo *pInfo) {
}
if
(
pNode
->
selfIndex
<
0
)
{
s
Info
(
"vgId:%d, this node is not configured"
,
pNode
->
vgId
);
s
Error
(
"vgId:%d, this node is not configured"
,
pNode
->
vgId
);
terrno
=
TSDB_CODE_SYN_INVALID_CONFIG
;
syncStop
(
pNode
->
rid
);
return
-
1
;
...
...
src/vnode/src/vnodeCfg.c
浏览文件 @
ffadd16e
...
...
@@ -242,9 +242,8 @@ int32_t vnodeReadCfg(SVnodeObj *pVnode) {
}
tstrncpy
(
node
->
nodeEp
,
nodeEp
->
valuestring
,
TSDB_EP_LEN
);
if
(
!
nodeChanged
)
{
nodeChanged
=
dnodeCheckEpChanged
(
node
->
nodeId
,
node
->
nodeEp
);
}
bool
changed
=
dnodeCheckEpChanged
(
node
->
nodeId
,
node
->
nodeEp
);
if
(
changed
)
nodeChanged
=
changed
;
}
ret
=
TSDB_CODE_SUCCESS
;
...
...
src/vnode/src/vnodeMain.c
浏览文件 @
ffadd16e
...
...
@@ -362,9 +362,8 @@ int32_t vnodeOpen(int32_t vnode, char *rootDir) {
pVnode
->
role
=
TAOS_SYNC_ROLE_MASTER
;
#else
if
(
pVnode
->
sync
<=
0
)
{
vError
(
"vgId:%d, failed to open sync
module
, replica:%d reason:%s"
,
pVnode
->
vgId
,
pVnode
->
syncCfg
.
replica
,
vError
(
"vgId:%d, failed to open sync, replica:%d reason:%s"
,
pVnode
->
vgId
,
pVnode
->
syncCfg
.
replica
,
tstrerror
(
terrno
));
vnodeRelease
(
pVnode
);
vnodeCleanUp
(
pVnode
);
return
terrno
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录