empty metrics data sets are not an error (#280)

This commit is contained in:
Michael Quigley 2023-03-28 15:06:19 -04:00
parent bd4ce22d97
commit e2d0b7990e
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62

View File

@ -81,7 +81,7 @@ func (r *influxReader) runQueryForRxTx(query string) (rx int64, tx int64, err er
}
count++
}
if count != 2 {
if count != 0 && count != 2 {
return -1, -1, errors.Errorf("expected 2 results; got '%d' (%v)", count, strings.ReplaceAll(query, "\n", ""))
}
return rx, tx, nil