Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
20e2acba
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看板
提交
20e2acba
编写于
12月 06, 2022
作者:
M
Minghao Li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(sync): add reserved field in message
上级
b30e411f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
0 deletion
+12
-0
source/libs/sync/inc/syncMessage.h
source/libs/sync/inc/syncMessage.h
+12
-0
未找到文件。
source/libs/sync/inc/syncMessage.h
浏览文件 @
20e2acba
...
@@ -46,6 +46,7 @@ typedef struct SyncClientRequest {
...
@@ -46,6 +46,7 @@ typedef struct SyncClientRequest {
uint32_t
originalRpcType
;
// origin RpcMsg msgType
uint32_t
originalRpcType
;
// origin RpcMsg msgType
uint64_t
seqNum
;
uint64_t
seqNum
;
bool
isWeak
;
bool
isWeak
;
int16_t
reserved
;
uint32_t
dataLen
;
// origin RpcMsg.contLen
uint32_t
dataLen
;
// origin RpcMsg.contLen
char
data
[];
// origin RpcMsg.pCont
char
data
[];
// origin RpcMsg.pCont
}
SyncClientRequest
;
}
SyncClientRequest
;
...
@@ -56,6 +57,7 @@ typedef struct SyncClientRequestReply {
...
@@ -56,6 +57,7 @@ typedef struct SyncClientRequestReply {
uint32_t
msgType
;
uint32_t
msgType
;
int32_t
errCode
;
int32_t
errCode
;
SRaftId
leaderHint
;
SRaftId
leaderHint
;
int16_t
reserved
;
}
SyncClientRequestReply
;
}
SyncClientRequestReply
;
typedef
struct
SyncRequestVote
{
typedef
struct
SyncRequestVote
{
...
@@ -68,6 +70,7 @@ typedef struct SyncRequestVote {
...
@@ -68,6 +70,7 @@ typedef struct SyncRequestVote {
SyncTerm
term
;
SyncTerm
term
;
SyncIndex
lastLogIndex
;
SyncIndex
lastLogIndex
;
SyncTerm
lastLogTerm
;
SyncTerm
lastLogTerm
;
int16_t
reserved
;
}
SyncRequestVote
;
}
SyncRequestVote
;
typedef
struct
SyncRequestVoteReply
{
typedef
struct
SyncRequestVoteReply
{
...
@@ -79,6 +82,7 @@ typedef struct SyncRequestVoteReply {
...
@@ -79,6 +82,7 @@ typedef struct SyncRequestVoteReply {
// private data
// private data
SyncTerm
term
;
SyncTerm
term
;
bool
voteGranted
;
bool
voteGranted
;
int16_t
reserved
;
}
SyncRequestVoteReply
;
}
SyncRequestVoteReply
;
typedef
struct
SyncAppendEntries
{
typedef
struct
SyncAppendEntries
{
...
@@ -94,6 +98,7 @@ typedef struct SyncAppendEntries {
...
@@ -94,6 +98,7 @@ typedef struct SyncAppendEntries {
SyncTerm
prevLogTerm
;
SyncTerm
prevLogTerm
;
SyncIndex
commitIndex
;
SyncIndex
commitIndex
;
SyncTerm
privateTerm
;
SyncTerm
privateTerm
;
int16_t
reserved
;
uint32_t
dataLen
;
uint32_t
dataLen
;
char
data
[];
char
data
[];
}
SyncAppendEntries
;
}
SyncAppendEntries
;
...
@@ -111,6 +116,7 @@ typedef struct SyncAppendEntriesReply {
...
@@ -111,6 +116,7 @@ typedef struct SyncAppendEntriesReply {
SyncIndex
matchIndex
;
SyncIndex
matchIndex
;
SyncIndex
lastSendIndex
;
SyncIndex
lastSendIndex
;
int64_t
startTime
;
int64_t
startTime
;
int16_t
reserved
;
}
SyncAppendEntriesReply
;
}
SyncAppendEntriesReply
;
typedef
struct
SyncHeartbeat
{
typedef
struct
SyncHeartbeat
{
...
@@ -126,6 +132,7 @@ typedef struct SyncHeartbeat {
...
@@ -126,6 +132,7 @@ typedef struct SyncHeartbeat {
SyncTerm
privateTerm
;
SyncTerm
privateTerm
;
SyncTerm
minMatchIndex
;
SyncTerm
minMatchIndex
;
int64_t
timeStamp
;
int64_t
timeStamp
;
int16_t
reserved
;
}
SyncHeartbeat
;
}
SyncHeartbeat
;
typedef
struct
SyncHeartbeatReply
{
typedef
struct
SyncHeartbeatReply
{
...
@@ -140,6 +147,7 @@ typedef struct SyncHeartbeatReply {
...
@@ -140,6 +147,7 @@ typedef struct SyncHeartbeatReply {
SyncTerm
privateTerm
;
SyncTerm
privateTerm
;
int64_t
startTime
;
int64_t
startTime
;
int64_t
timeStamp
;
int64_t
timeStamp
;
int16_t
reserved
;
}
SyncHeartbeatReply
;
}
SyncHeartbeatReply
;
typedef
struct
SyncPreSnapshot
{
typedef
struct
SyncPreSnapshot
{
...
@@ -151,6 +159,7 @@ typedef struct SyncPreSnapshot {
...
@@ -151,6 +159,7 @@ typedef struct SyncPreSnapshot {
// private data
// private data
SyncTerm
term
;
SyncTerm
term
;
int16_t
reserved
;
}
SyncPreSnapshot
;
}
SyncPreSnapshot
;
typedef
struct
SyncPreSnapshotReply
{
typedef
struct
SyncPreSnapshotReply
{
...
@@ -163,6 +172,7 @@ typedef struct SyncPreSnapshotReply {
...
@@ -163,6 +172,7 @@ typedef struct SyncPreSnapshotReply {
// private data
// private data
SyncTerm
term
;
SyncTerm
term
;
SyncIndex
snapStart
;
SyncIndex
snapStart
;
int16_t
reserved
;
}
SyncPreSnapshotReply
;
}
SyncPreSnapshotReply
;
typedef
struct
SyncApplyMsg
{
typedef
struct
SyncApplyMsg
{
...
@@ -190,6 +200,7 @@ typedef struct SyncSnapshotSend {
...
@@ -190,6 +200,7 @@ typedef struct SyncSnapshotSend {
SSyncCfg
lastConfig
;
SSyncCfg
lastConfig
;
int64_t
startTime
;
int64_t
startTime
;
int32_t
seq
;
int32_t
seq
;
int16_t
reserved
;
uint32_t
dataLen
;
uint32_t
dataLen
;
char
data
[];
char
data
[];
}
SyncSnapshotSend
;
}
SyncSnapshotSend
;
...
@@ -208,6 +219,7 @@ typedef struct SyncSnapshotRsp {
...
@@ -208,6 +219,7 @@ typedef struct SyncSnapshotRsp {
int32_t
ack
;
int32_t
ack
;
int32_t
code
;
int32_t
code
;
SyncIndex
snapBeginIndex
;
// when ack = SYNC_SNAPSHOT_SEQ_BEGIN, it's valid
SyncIndex
snapBeginIndex
;
// when ack = SYNC_SNAPSHOT_SEQ_BEGIN, it's valid
int16_t
reserved
;
}
SyncSnapshotRsp
;
}
SyncSnapshotRsp
;
typedef
struct
SyncLeaderTransfer
{
typedef
struct
SyncLeaderTransfer
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录