Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6bf66d5d
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看板
提交
6bf66d5d
编写于
1月 22, 2021
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-2798
上级
a5ddcb38
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
13 addition
and
9 deletion
+13
-9
src/dnode/src/dnodeVMgmt.c
src/dnode/src/dnodeVMgmt.c
+1
-1
src/sync/src/syncRestore.c
src/sync/src/syncRestore.c
+1
-1
src/tsdb/src/tsdbSync.c
src/tsdb/src/tsdbSync.c
+11
-7
未找到文件。
src/dnode/src/dnodeVMgmt.c
浏览文件 @
6bf66d5d
...
...
@@ -174,7 +174,7 @@ static int32_t dnodeProcessAlterVnodeMsg(SRpcMsg *rpcMsg) {
vnodeRelease
(
pVnode
);
return
code
;
}
else
{
d
Error
(
"vgId:%d, vnode not exist, can't alter it"
,
pAlter
->
cfg
.
vgId
);
d
Info
(
"vgId:%d, vnode not exist, can't alter it"
,
pAlter
->
cfg
.
vgId
);
return
TSDB_CODE_VND_INVALID_VGROUP_ID
;
}
}
...
...
src/sync/src/syncRestore.c
浏览文件 @
6bf66d5d
...
...
@@ -224,7 +224,7 @@ static int32_t syncRestoreDataStepByStep(SSyncPeer *pPeer) {
int32_t
code
=
syncRestoreFile
(
pPeer
,
&
fversion
);
if
(
code
<
0
)
{
sError
(
"%s, failed to restore file"
,
pPeer
->
id
);
sError
(
"%s, failed to restore file
s
"
,
pPeer
->
id
);
return
-
1
;
}
...
...
src/tsdb/src/tsdbSync.c
浏览文件 @
6bf66d5d
...
...
@@ -123,6 +123,7 @@ static int32_t tsdbSyncSendMeta(SSyncH *pSynch) {
SMFile
mf
;
// Send meta info to remote
tsdbInfo
(
"vgId:%d, metainfo will be sent"
,
REPO_ID
(
pRepo
));
if
(
tsdbSendMetaInfo
(
pSynch
)
<
0
)
{
tsdbError
(
"vgId:%d, failed to send metainfo since %s"
,
REPO_ID
(
pRepo
),
tstrerror
(
terrno
));
return
-
1
;
...
...
@@ -140,8 +141,6 @@ static int32_t tsdbSyncSendMeta(SSyncH *pSynch) {
}
if
(
toSendMeta
)
{
tsdbInfo
(
"vgId:%d, metafile will be sent"
,
REPO_ID
(
pRepo
));
tsdbInitMFileEx
(
&
mf
,
pRepo
->
fs
->
cstatus
->
pmf
);
if
(
tsdbOpenMFile
(
&
mf
,
O_RDONLY
)
<
0
)
{
tsdbError
(
"vgId:%d, failed to open file while send metafile since %s"
,
REPO_ID
(
pRepo
),
tstrerror
(
terrno
));
...
...
@@ -149,6 +148,8 @@ static int32_t tsdbSyncSendMeta(SSyncH *pSynch) {
}
int32_t
writeLen
=
mf
.
info
.
size
;
tsdbInfo
(
"vgId:%d, metafile:%s will be sent, size:%d"
,
REPO_ID
(
pRepo
),
mf
.
f
.
aname
,
writeLen
);
int32_t
ret
=
taosSendFile
(
pSynch
->
socketFd
,
TSDB_FILE_FD
(
&
mf
),
0
,
writeLen
);
if
(
ret
!=
writeLen
)
{
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
...
...
@@ -159,7 +160,7 @@ static int32_t tsdbSyncSendMeta(SSyncH *pSynch) {
}
tsdbCloseMFile
(
&
mf
);
tsdbInfo
(
"vgId:%d, metafile is sent
, size:%d"
,
REPO_ID
(
pRepo
),
writeLen
);
tsdbInfo
(
"vgId:%d, metafile is sent
"
,
REPO_ID
(
pRepo
)
);
}
else
{
tsdbInfo
(
"vgId:%d, metafile is same, no need to send"
,
REPO_ID
(
pRepo
));
}
...
...
@@ -208,6 +209,8 @@ static int32_t tsdbSyncRecvMeta(SSyncH *pSynch) {
return
-
1
;
}
tsdbInfo
(
"vgId:%d, metafile:%s is created"
,
REPO_ID
(
pRepo
),
mf
.
f
.
aname
);
int32_t
readLen
=
pSynch
->
pmf
->
info
.
size
;
int32_t
ret
=
taosCopyFds
(
pSynch
->
socketFd
,
TSDB_FILE_FD
(
&
mf
),
readLen
);
if
(
ret
!=
readLen
)
{
...
...
@@ -266,6 +269,7 @@ static int32_t tsdbSendMetaInfo(SSyncH *pSynch) {
return
-
1
;
}
tsdbInfo
(
"vgId:%d, metainfo is sent, tlen:%d, writeLen:%d"
,
REPO_ID
(
pRepo
),
tlen
,
writeLen
);
return
0
;
}
...
...
@@ -278,13 +282,13 @@ static int32_t tsdbRecvMetaInfo(SSyncH *pSynch) {
int32_t
ret
=
taosReadMsg
(
pSynch
->
socketFd
,
buf
,
readLen
);
if
(
ret
!=
readLen
)
{
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
tsdbError
(
"vgId:%d, failed to recv meta
info
len, ret:%d readLen:%d"
,
REPO_ID
(
pRepo
),
ret
,
readLen
);
tsdbError
(
"vgId:%d, failed to recv metalen, ret:%d readLen:%d"
,
REPO_ID
(
pRepo
),
ret
,
readLen
);
return
-
1
;
}
taosDecodeFixedU32
(
buf
,
&
tlen
);
tsdbInfo
(
"vgId:%d, meta
info len:%d is received"
,
REPO_ID
(
pRepo
)
,
tlen
);
tsdbInfo
(
"vgId:%d, meta
len is received, readLen:%d, tlen:%d"
,
REPO_ID
(
pRepo
),
readLen
,
tlen
);
if
(
tlen
==
0
)
{
pSynch
->
pmf
=
NULL
;
return
0
;
...
...
@@ -298,11 +302,11 @@ static int32_t tsdbRecvMetaInfo(SSyncH *pSynch) {
ret
=
taosReadMsg
(
pSynch
->
socketFd
,
SYNC_BUFFER
(
pSynch
),
tlen
);
if
(
ret
!=
tlen
)
{
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
tsdbError
(
"vgId:%d, failed to recv metainfo, ret:%d
readL
en:%d"
,
REPO_ID
(
pRepo
),
ret
,
tlen
);
tsdbError
(
"vgId:%d, failed to recv metainfo, ret:%d
tl
en:%d"
,
REPO_ID
(
pRepo
),
ret
,
tlen
);
return
-
1
;
}
tsdbInfo
(
"vgId:%d, metainfo is received
"
,
REPO_ID
(
pRepo
)
);
tsdbInfo
(
"vgId:%d, metainfo is received
, tlen:%d"
,
REPO_ID
(
pRepo
),
tlen
);
if
(
!
taosCheckChecksumWhole
((
uint8_t
*
)
SYNC_BUFFER
(
pSynch
),
tlen
))
{
terrno
=
TSDB_CODE_TDB_MESSED_MSG
;
tsdbError
(
"vgId:%d, failed to checksum while recv metainfo since %s"
,
REPO_ID
(
pRepo
),
tstrerror
(
terrno
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录