Skip to content

Commit

Permalink
kvserverpb: add MsgAppResp field to {Delegate,}SnapshotResponse
Browse files Browse the repository at this point in the history
This will be used to hand the MsgAppResp generated at snapshot application back
to the sender.
  • Loading branch information
tbg authored and Thomas Hardy committed Jul 21, 2023
1 parent 495b021 commit 4b8e215
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pkg/kv/kvserver/kvserverpb/raft.proto
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,14 @@ message SnapshotResponse {
//
// MIGRATION: only guaranteed to be set when the message field is no longer there.
errorspb.EncodedError encoded_error = 5 [(gogoproto.nullable) = false];

// msg_app_resp stores an optional MsgAppResp the receiving RawNode may have
// generated in response to applying the snapshot. This message will also have
// been handed to the raft transport, but it is helpful to step it into the
// sender manually to avoid the race described in:
//
// https://github.com/cockroachdb/cockroach/issues/97971
raftpb.Message msg_app_resp = 6;
}

// TODO(baptist): Extend this if necessary to separate out the request for the throttle.
Expand Down Expand Up @@ -356,6 +364,14 @@ message DelegateSnapshotResponse {
// collected_spans stores trace spans recorded during the execution of this
// request.
repeated util.tracing.tracingpb.RecordedSpan collected_spans = 3 [(gogoproto.nullable) = false];

// msg_app_resp stores an optional MsgAppResp the receiving RawNode may have
// generated in response to applying the snapshot. This message will also have
// been handed to the raft transport, but it is helpful to step it into the
// sender manually to avoid the race described in:
//
// https://github.com/cockroachdb/cockroach/issues/97971
raftpb.Message msg_app_resp = 4;
}

// ConfChangeContext is encoded in the raftpb.ConfChange.Context field.
Expand Down

0 comments on commit 4b8e215

Please sign in to comment.