From a4779cae64546d5fe9835221d1c9d918cf0abbf7 Mon Sep 17 00:00:00 2001 From: Bisheng Huang Date: Wed, 15 May 2024 16:48:19 +0800 Subject: [PATCH] raft_serverpb: add new ExtraMessage types for the snapshot gen precheck 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 --- proto/raft_serverpb.proto | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/proto/raft_serverpb.proto b/proto/raft_serverpb.proto index 840f73fcb..7f392d01f 100644 --- a/proto/raft_serverpb.proto +++ b/proto/raft_serverpb.proto @@ -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 { @@ -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; }