Skip to content

Commit 508fcce

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

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

raft.go

Lines changed: 1 addition & 1 deletion
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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,12 @@ func (pr *Progress) BecomeSnapshot(snapshoti uint64) {
162162
pr.sentCommit = snapshoti
163163
}
164164

165-
// UpdateOnEntriesSend updates the progress on the given number of consecutive
166-
// entries being sent in a MsgApp, with the given total bytes size, appended at
167-
// log indices >= pr.Next.
165+
// SentEntries updates the progress on the given number of consecutive entries
166+
// being sent in a MsgApp, with the given total bytes size, appended at log
167+
// indices >= pr.Next.
168168
//
169169
// Must be used with StateProbe or StateReplicate.
170-
func (pr *Progress) UpdateOnEntriesSend(entries int, bytes uint64) {
170+
func (pr *Progress) SentEntries(entries int, bytes uint64) {
171171
switch pr.State {
172172
case StateReplicate:
173173
if entries > 0 {

0 commit comments

Comments
 (0)