Skip to content

Commit

Permalink
fix invalid safety limit
Browse files Browse the repository at this point in the history
  • Loading branch information
mtanda committed Oct 25, 2019
1 parent b31cf5c commit 00cb66e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ func (t *AwsCloudWatchLogsDatasource) getLogEvent(tsdbReq *datasource.Datasource
err = svc.FilterLogEventsPages(input,
func(page *cloudwatchlogs.FilterLogEventsOutput, lastPage bool) bool {
resp.Events = append(resp.Events, page.Events...)
if len(resp.Events) > 1000 {
if len(resp.Events) > 10000 {
return false // safety limit
}
if int64(len(resp.Events)) >= *input.Limit {
Expand Down Expand Up @@ -402,7 +402,7 @@ func (t *AwsCloudWatchLogsDatasource) getLogEvent(tsdbReq *datasource.Datasource
}
resp.Events = append(resp.Events, fe)
}
if len(resp.Events) > 1000 {
if len(resp.Events) > 10000 {
return false // safety limit
}
if int64(len(resp.Events)) >= *input.Limit {
Expand Down

0 comments on commit 00cb66e

Please sign in to comment.