Skip to content

Commit

Permalink
Merge pull request #883 from whitebear009/oom-record-sort
Browse files Browse the repository at this point in the history
fix oom record sort
  • Loading branch information
mfanjie authored Mar 15, 2024
2 parents 3fa7240 + 832e1bc commit c73e558
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/oom/recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func (r *PodOOMRecorder) cleanOOMRecords(oomRecords []OOMRecord) []OOMRecord {
return records[i].OOMAt.Before(records[j].OOMAt)
})

records = records[0:r.OOMRecordMaxNumber]
records = records[len(oomRecords)-r.OOMRecordMaxNumber : len(oomRecords)]
oomRecords = records
}

Expand Down

0 comments on commit c73e558

Please sign in to comment.