Skip to content

Commit

Permalink
kvserver: tweak a comment about raft snaps
Browse files Browse the repository at this point in the history
Suggested by Nathan[^1].

[^1]: cockroachdb#87702 (comment)

Release note: None
  • Loading branch information
tbg committed Sep 19, 2022
1 parent 87ed064 commit 3121f2c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/kv/kvserver/replica_raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -1653,9 +1653,12 @@ func (r *Replica) reportSnapshotStatus(ctx context.Context, to roachpb.ReplicaID
// snapshot is supposed to be at. Raft asked for a particular applied index,
// but the snapshot we sent might have been at a higher (most of the time) or
// lower (corner cases) index too. Luckily this is not an issue as the call
// below will only inform at which idnex the follower is next probed (after
// below will only inform at which index the follower is next probed (after
// ReportSnapshot with a success). Raft does not a priori assume that the
// index it requested is now actually durable on the follower.
// index it requested is now actually durable on the follower. Note also that
// the follower will generate an MsgAppResp reflecting the applied snapshot
// which typically moves the follower to StateReplicate when (if) received
// by the leader.
//
// See: https://github.com/cockroachdb/cockroach/issues/87581
if err := r.withRaftGroup(true, func(raftGroup *raft.RawNode) (bool, error) {
Expand Down

0 comments on commit 3121f2c

Please sign in to comment.