Skip to content

Commit e8365b4

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

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
@@ -157,12 +157,12 @@ func (pr *Progress) BecomeSnapshot(snapshoti uint64) {
157157
pr.PendingSnapshot = snapshoti
158158
}
159159

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

0 commit comments

Comments
 (0)