Skip to content

Commit 86df592

Browse files
committed
raft: fix BenchmarkRawNode
Epic: none Release note: none
1 parent 835f8e6 commit 86df592

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/raft/rawnode_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,8 +1073,13 @@ func benchmarkRawNodeImpl(b *testing.B, peers ...pb.PeerID) {
10731073
if debug {
10741074
b.Log(DescribeReady(rd, nil))
10751075
}
1076-
if !rd.Committed.Empty() {
1076+
if span := rd.Committed; !span.Empty() {
10771077
applied = uint64(rd.Committed.Last)
1078+
entries, err := rn.LogSnapshot().Slice(span, noLimit)
1079+
if err != nil {
1080+
panic(err)
1081+
}
1082+
rn.AckApplied(entries)
10781083
}
10791084
s.Append(rd.Entries)
10801085
for _, m := range rd.Messages {

0 commit comments

Comments
 (0)