提交 3072afba 编写于 作者: M Minghao Li

refactor(sync): add pre snapshot

上级 f7191d2f
......@@ -39,6 +39,7 @@ extern bool gRaftDetailLog;
#define SYNC_ADD_QUORUM_COUNT 3
#define SYNC_MNODE_LOG_RETENTION 10000
#define SYNC_VNODE_LOG_RETENTION 100
#define SNAPSHOT_MAX_CLOCK_SKEW_MS 1000 * 10
#define SYNC_APPEND_ENTRIES_TIMEOUT_MS 10000
......
......@@ -617,7 +617,7 @@ typedef struct SyncSnapshotSend {
SyncTerm lastTerm; // snapshot.lastTerm
SyncIndex lastConfigIndex; // snapshot.lastConfigIndex
SSyncCfg lastConfig;
SyncTerm privateTerm;
int64_t startTime;
int32_t seq;
uint32_t dataLen;
char data[];
......@@ -652,9 +652,10 @@ typedef struct SyncSnapshotRsp {
SyncTerm term;
SyncIndex lastIndex;
SyncTerm lastTerm;
SyncTerm privateTerm;
int64_t startTime;
int32_t ack;
int32_t code;
SyncIndex snapBeginIndex; // when ack = SYNC_SNAPSHOT_SEQ_BEGIN, it's valid
} SyncSnapshotRsp;
SyncSnapshotRsp* syncSnapshotRspBuild(int32_t vgId);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册