Skip to content

Commit c55352f

Browse files
committedJan 30, 2024
tracker: remove unused OptimisticUpdate method
Signed-off-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
1 parent 40a19f1 commit c55352f

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed
 

‎raft_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2901,7 +2901,7 @@ func TestRecvMsgUnreachable(t *testing.T) {
29012901
// set node 2 to state replicate
29022902
r.trk.Progress[2].Match = 3
29032903
r.trk.Progress[2].BecomeReplicate()
2904-
r.trk.Progress[2].OptimisticUpdate(5)
2904+
r.trk.Progress[2].Next = 6
29052905

29062906
r.Step(pb.Message{From: 2, To: 1, Type: pb.MsgUnreachable})
29072907

‎tracker/progress.go

-4
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,6 @@ func (pr *Progress) MaybeUpdate(n uint64) bool {
190190
return updated
191191
}
192192

193-
// OptimisticUpdate signals that appends all the way up to and including index n
194-
// are in-flight. As a result, Next is increased to n+1.
195-
func (pr *Progress) OptimisticUpdate(n uint64) { pr.Next = n + 1 }
196-
197193
// MaybeDecrTo adjusts the Progress to the receipt of a MsgApp rejection. The
198194
// arguments are the index of the append message rejected by the follower, and
199195
// the hint that we want to decrease to.

0 commit comments

Comments
 (0)
Please sign in to comment.