Skip to content

Commit

Permalink
raft_serverpb: add new ExtraMessage types for the snapshot gen preche…
Browse files Browse the repository at this point in the history
…ck process

This commit adds two new new ExtraMessage types that are part of the snapshot
gen precheck process.

Before a leader generates a snapshot, it sends a precheck request to the target
follower. The follower responds with a boolean value indicating whether the
check succeeds.

Signed-off-by: Bisheng Huang <[email protected]>
  • Loading branch information
hbisheng committed May 15, 2024
1 parent d350e60 commit a4779ca
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions proto/raft_serverpb.proto
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ enum ExtraMessageType {
MsgGcPeerResponse = 12;
MsgFlushMemtable = 13;
MsgRefreshBuckets = 14;

MsgSnapshotSendPrecheckRequest = 15;
MsgSnapshotSendPrecheckResponse = 16;
// Messages for the snapshot gen precheck process.
MsgSnapGenPrecheckRequest = 15;
MsgSnapGenPrecheckResponse = 16;
}

message FlushMemtable {
Expand Down Expand Up @@ -296,7 +296,7 @@ message ExtraMessage {
AvailabilityContext availability_context = 8;
// notice the peer to refresh buckets version
RefreshBuckets refresh_buckets = 9;
// A snapshot is only sent by the leader after this precheck, conducted on
// the follower, has successfully passed.
bool snapshot_precheck_passed = 10;
// snapshot_gen_precheck_passed is used to indicate the precheck result when
// a follower responds to a leader's precheck request.
bool snapshot_gen_precheck_passed = 10;
}

0 comments on commit a4779ca

Please sign in to comment.