Skip to content

Commit

Permalink
fix(perf) skip to process nil ring
Browse files Browse the repository at this point in the history
Signed-off-by: zhuhuijun <zhuhuijunzhj@gmail.com>
  • Loading branch information
Ghostbaby committed Jul 4, 2024
1 parent f2b2f6d commit bd337dd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions perf/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,11 @@ func (pr *Reader) ReadInto(rec *Record) error {
// Waking up userspace is expensive, make the most of it by checking
// all rings.
for _, ring := range pr.rings {
// Skip rings that are offline.
if ring == nil {
continue
}

ring.loadHead()
pr.epollRings = append(pr.epollRings, ring)
}
Expand Down

0 comments on commit bd337dd

Please sign in to comment.