Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
8a46fcb2
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看板
提交
8a46fcb2
编写于
11月 12, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fix/TD-20052_2' into fix/TD-20052
上级
c6c73435
5b46cbef
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
11 addition
and
13 deletion
+11
-13
source/libs/sync/inc/syncMessage.h
source/libs/sync/inc/syncMessage.h
+0
-11
source/libs/sync/src/syncMain.c
source/libs/sync/src/syncMain.c
+1
-1
source/libs/sync/src/syncRequestVote.c
source/libs/sync/src/syncRequestVote.c
+1
-1
source/libs/sync/test/sync_test_lib/inc/syncBatch.h
source/libs/sync/test/sync_test_lib/inc/syncBatch.h
+9
-0
未找到文件。
source/libs/sync/inc/syncMessage.h
浏览文件 @
8a46fcb2
...
@@ -115,17 +115,6 @@ void syncAppendEntriesPrint2(char* s, const SyncAppendEntries* pMsg);
...
@@ -115,17 +115,6 @@ void syncAppendEntriesPrint2(char* s, const SyncAppendEntries* pMsg);
void
syncAppendEntriesLog
(
const
SyncAppendEntries
*
pMsg
);
void
syncAppendEntriesLog
(
const
SyncAppendEntries
*
pMsg
);
void
syncAppendEntriesLog2
(
char
*
s
,
const
SyncAppendEntries
*
pMsg
);
void
syncAppendEntriesLog2
(
char
*
s
,
const
SyncAppendEntries
*
pMsg
);
// ---------------------------------------------
typedef
struct
SOffsetAndContLen
{
int32_t
offset
;
int32_t
contLen
;
}
SOffsetAndContLen
;
// data:
// block1: SOffsetAndContLen Array
// block2: entry Array
typedef
struct
SyncAppendEntriesReply
{
typedef
struct
SyncAppendEntriesReply
{
uint32_t
bytes
;
uint32_t
bytes
;
int32_t
vgId
;
int32_t
vgId
;
...
...
source/libs/sync/src/syncMain.c
浏览文件 @
8a46fcb2
...
@@ -1654,7 +1654,7 @@ void syncNodeVoteForSelf(SSyncNode* pSyncNode) {
...
@@ -1654,7 +1654,7 @@ void syncNodeVoteForSelf(SSyncNode* pSyncNode) {
SRpcMsg
rpcMsg
=
{
0
};
SRpcMsg
rpcMsg
=
{
0
};
int32_t
ret
=
syncBuildRequestVoteReply
(
&
rpcMsg
,
pSyncNode
->
vgId
);
int32_t
ret
=
syncBuildRequestVoteReply
(
&
rpcMsg
,
pSyncNode
->
vgId
);
if
(
ret
=
=
0
)
return
;
if
(
ret
!
=
0
)
return
;
SyncRequestVoteReply
*
pMsg
=
rpcMsg
.
pCont
;
SyncRequestVoteReply
*
pMsg
=
rpcMsg
.
pCont
;
pMsg
->
srcId
=
pSyncNode
->
myRaftId
;
pMsg
->
srcId
=
pSyncNode
->
myRaftId
;
...
...
source/libs/sync/src/syncRequestVote.c
浏览文件 @
8a46fcb2
...
@@ -141,7 +141,7 @@ int32_t syncNodeOnRequestVote(SSyncNode* ths, const SRpcMsg* pRpcMsg) {
...
@@ -141,7 +141,7 @@ int32_t syncNodeOnRequestVote(SSyncNode* ths, const SRpcMsg* pRpcMsg) {
// send msg
// send msg
SRpcMsg
rpcMsg
=
{
0
};
SRpcMsg
rpcMsg
=
{
0
};
ret
=
syncBuildRequestVoteReply
(
&
rpcMsg
,
ths
->
vgId
);
ret
=
syncBuildRequestVoteReply
(
&
rpcMsg
,
ths
->
vgId
);
ASSERT
(
ret
);
ASSERT
(
ret
==
0
);
SyncRequestVoteReply
*
pReply
=
rpcMsg
.
pCont
;
SyncRequestVoteReply
*
pReply
=
rpcMsg
.
pCont
;
pReply
->
srcId
=
ths
->
myRaftId
;
pReply
->
srcId
=
ths
->
myRaftId
;
...
...
source/libs/sync/test/sync_test_lib/inc/syncBatch.h
浏览文件 @
8a46fcb2
...
@@ -58,6 +58,15 @@ void syncClientRequestBatchPrint2(char* s, const SyncClientRequestBatch* pMsg);
...
@@ -58,6 +58,15 @@ void syncClientRequestBatchPrint2(char* s, const SyncClientRequestBatch* pMsg);
void
syncClientRequestBatchLog
(
const
SyncClientRequestBatch
*
pMsg
);
void
syncClientRequestBatchLog
(
const
SyncClientRequestBatch
*
pMsg
);
void
syncClientRequestBatchLog2
(
char
*
s
,
const
SyncClientRequestBatch
*
pMsg
);
void
syncClientRequestBatchLog2
(
char
*
s
,
const
SyncClientRequestBatch
*
pMsg
);
typedef
struct
SOffsetAndContLen
{
int32_t
offset
;
int32_t
contLen
;
}
SOffsetAndContLen
;
// data:
// block1: SOffsetAndContLen Array
// block2: entry Array
typedef
struct
SyncAppendEntriesBatch
{
typedef
struct
SyncAppendEntriesBatch
{
uint32_t
bytes
;
uint32_t
bytes
;
int32_t
vgId
;
int32_t
vgId
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录