Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
76628a52
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
76628a52
编写于
11月 14, 2022
作者:
M
Minghao Li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(sync): do not use SNError
上级
ac8eeb87
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
9 deletion
+9
-9
source/libs/sync/src/syncMain.c
source/libs/sync/src/syncMain.c
+9
-9
未找到文件。
source/libs/sync/src/syncMain.c
浏览文件 @
76628a52
...
...
@@ -1806,7 +1806,7 @@ static void syncNodeEqPingTimer(void* param, void* tmrId) {
int32_t
code
=
syncBuildTimeout
(
&
rpcMsg
,
SYNC_TIMEOUT_PING
,
atomic_load_64
(
&
pNode
->
pingTimerLogicClock
),
pNode
->
pingTimerMS
,
pNode
);
if
(
code
!=
0
)
{
sError
(
pNode
,
"failed to build ping msg"
);
sError
(
"failed to build ping msg"
);
rpcFreeCont
(
rpcMsg
.
pCont
);
return
;
}
...
...
@@ -1814,7 +1814,7 @@ static void syncNodeEqPingTimer(void* param, void* tmrId) {
sNTrace
(
pNode
,
"enqueue ping msg"
);
code
=
pNode
->
syncEqMsg
(
pNode
->
msgcb
,
&
rpcMsg
);
if
(
code
!=
0
)
{
sError
(
pNode
,
"failed to sync enqueue ping msg since %s"
,
terrstr
());
sError
(
"failed to sync enqueue ping msg since %s"
,
terrstr
());
rpcFreeCont
(
rpcMsg
.
pCont
);
return
;
}
...
...
@@ -1839,7 +1839,7 @@ static void syncNodeEqElectTimer(void* param, void* tmrId) {
int32_t
code
=
syncBuildTimeout
(
&
rpcMsg
,
SYNC_TIMEOUT_ELECTION
,
pElectTimer
->
logicClock
,
pNode
->
electTimerMS
,
pNode
);
if
(
code
!=
0
)
{
sError
(
pNode
,
"failed to build elect msg"
);
sError
(
"failed to build elect msg"
);
taosMemoryFree
(
pElectTimer
);
return
;
}
...
...
@@ -1849,7 +1849,7 @@ static void syncNodeEqElectTimer(void* param, void* tmrId) {
code
=
pNode
->
syncEqMsg
(
pNode
->
msgcb
,
&
rpcMsg
);
if
(
code
!=
0
)
{
sError
(
pNode
,
"failed to sync enqueue elect msg since %s"
,
terrstr
());
sError
(
"failed to sync enqueue elect msg since %s"
,
terrstr
());
rpcFreeCont
(
rpcMsg
.
pCont
);
taosMemoryFree
(
pElectTimer
);
return
;
...
...
@@ -1879,14 +1879,14 @@ static void syncNodeEqHeartbeatTimer(void* param, void* tmrId) {
pNode
->
heartbeatTimerMS
,
pNode
);
if
(
code
!=
0
)
{
s
NError
(
pNode
,
"failed to build heartbeat msg"
);
s
Error
(
"failed to build heartbeat msg"
);
return
;
}
sNTrace
(
pNode
,
"enqueue heartbeat timer"
);
code
=
pNode
->
syncEqMsg
(
pNode
->
msgcb
,
&
rpcMsg
);
if
(
code
!=
0
)
{
s
NError
(
pNode
,
"failed to enqueue heartbeat msg since %s"
,
terrstr
());
s
Error
(
"failed to enqueue heartbeat msg since %s"
,
terrstr
());
rpcFreeCont
(
rpcMsg
.
pCont
);
return
;
}
...
...
@@ -1971,7 +1971,7 @@ static int32_t syncNodeEqNoop(SSyncNode* pNode) {
sNTrace
(
pNode
,
"propose msg, type:noop"
);
code
=
(
*
pNode
->
syncEqMsg
)(
pNode
->
msgcb
,
&
rpcMsg
);
if
(
code
!=
0
)
{
s
NError
(
pNode
,
"failed to propose noop msg while enqueue since %s"
,
terrstr
());
s
Error
(
"failed to propose noop msg while enqueue since %s"
,
terrstr
());
}
return
code
;
...
...
@@ -2005,7 +2005,7 @@ static int32_t syncNodeAppendNoop(SSyncNode* ths) {
if
(
ths
->
state
==
TAOS_SYNC_STATE_LEADER
)
{
int32_t
code
=
ths
->
pLogStore
->
syncLogAppendEntry
(
ths
->
pLogStore
,
pEntry
);
if
(
code
!=
0
)
{
s
NError
(
ths
,
"append noop error"
);
s
Error
(
"append noop error"
);
return
-
1
;
}
}
...
...
@@ -2109,7 +2109,7 @@ int32_t syncNodeOnLocalCmd(SSyncNode* ths, const SRpcMsg* pRpcMsg) {
syncNodeFollowerCommit
(
ths
,
pMsg
->
fcIndex
);
}
else
{
s
NError
(
ths
,
"error local cmd"
);
s
Error
(
"error local cmd"
);
}
return
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录