Skip to content

Commit 8b05a9d

Browse files
committed
tracker: use a simpler SentEntires method name
Signed-off-by: Pavel Kalinnikov <[email protected]>
1 parent 4399f8f commit 8b05a9d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

raft.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ func (r *raft) maybeSendAppend(to uint64, sendIfEmpty bool) bool {
644644
Entries: ents,
645645
Commit: r.raftLog.committed,
646646
})
647-
pr.UpdateOnEntriesSend(len(ents), uint64(payloadsSize(ents)))
647+
pr.SentEntries(len(ents), uint64(payloadsSize(ents)))
648648
pr.SentCommit(r.raftLog.committed)
649649
return true
650650
}

tracker/progress.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,12 @@ func (pr *Progress) BecomeSnapshot(snapshoti uint64) {
154154
pr.sentCommit = snapshoti
155155
}
156156

157-
// UpdateOnEntriesSend updates the progress on the given number of consecutive
158-
// entries being sent in a MsgApp, with the given total bytes size, appended at
159-
// log indices >= pr.Next.
157+
// SentEntries updates the progress on the given number of consecutive entries
158+
// being sent in a MsgApp, with the given total bytes size, appended at log
159+
// indices >= pr.Next.
160160
//
161161
// Must be used with StateProbe or StateReplicate.
162-
func (pr *Progress) UpdateOnEntriesSend(entries int, bytes uint64) {
162+
func (pr *Progress) SentEntries(entries int, bytes uint64) {
163163
switch pr.State {
164164
case StateReplicate:
165165
if entries > 0 {

0 commit comments

Comments
 (0)