fix: failing ci on master (#10175)
This commit is contained in:
parent
84e7a6acbe
commit
9bd0c6121e
2
go.mod
2
go.mod
|
|
@ -196,7 +196,7 @@ require (
|
|||
github.com/multiplay/go-ts3 v1.0.0
|
||||
github.com/naoina/go-stringutil v0.1.0 // indirect
|
||||
github.com/nats-io/jwt/v2 v2.1.0 // indirect
|
||||
github.com/nats-io/nats-server/v2 v2.6.3
|
||||
github.com/nats-io/nats-server/v2 v2.6.5
|
||||
github.com/nats-io/nats.go v1.13.1-0.20211018182449-f2416a8b1483
|
||||
github.com/nats-io/nkeys v0.3.0 // indirect
|
||||
github.com/nats-io/nuid v1.0.1 // indirect
|
||||
|
|
|
|||
4
go.sum
4
go.sum
|
|
@ -1582,8 +1582,8 @@ github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL
|
|||
github.com/nats-io/jwt/v2 v2.1.0 h1:1UbfD5g1xTdWmSeRV8bh/7u+utTiBsRtWhLl1PixZp4=
|
||||
github.com/nats-io/jwt/v2 v2.1.0/go.mod h1:0tqz9Hlu6bCBFLWAASKhE5vUA4c24L9KPUUgvwumE/k=
|
||||
github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k=
|
||||
github.com/nats-io/nats-server/v2 v2.6.3 h1:/ponRuIBtTiVDZRBjTKP+Cm/SWpvovI3vuB3pkpRQWw=
|
||||
github.com/nats-io/nats-server/v2 v2.6.3/go.mod h1:LlMieumxNUnCloOTVFv7Wog0YnasScxARUMXVXv9/+M=
|
||||
github.com/nats-io/nats-server/v2 v2.6.5 h1:VTG8gdSw4bEqMwKudOHkBLqGwNpNaJOwruj3+rquQlQ=
|
||||
github.com/nats-io/nats-server/v2 v2.6.5/go.mod h1:LlMieumxNUnCloOTVFv7Wog0YnasScxARUMXVXv9/+M=
|
||||
github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w=
|
||||
github.com/nats-io/nats.go v1.13.1-0.20211018182449-f2416a8b1483 h1:GMx3ZOcMEVM5qnUItQ4eJyQ6ycwmIEB/VC/UxvdevE0=
|
||||
github.com/nats-io/nats.go v1.13.1-0.20211018182449-f2416a8b1483/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w=
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ func (c *httpClient) Write(ctx context.Context, metrics []telegraf.Metric) error
|
|||
}
|
||||
|
||||
func (c *httpClient) splitAndWriteBatch(ctx context.Context, bucket string, metrics []telegraf.Metric) error {
|
||||
log.Printf("W! [outputs.influxdb_v2] Retrying write after splitting metric payload in half to reduce batch size")
|
||||
c.log.Warnf("Retrying write after splitting metric payload in half to reduce batch size")
|
||||
midpoint := len(metrics) / 2
|
||||
|
||||
if err := c.writeBatch(ctx, bucket, metrics[:midpoint]); err != nil {
|
||||
|
|
@ -284,7 +284,7 @@ func (c *httpClient) writeBatch(ctx context.Context, bucket string, metrics []te
|
|||
switch resp.StatusCode {
|
||||
// request was too large, send back to try again
|
||||
case http.StatusRequestEntityTooLarge:
|
||||
log.Printf("E! [outputs.influxdb_v2] Failed to write metric, request was too large (413)")
|
||||
c.log.Errorf("Failed to write metric, request was too large (413)")
|
||||
return &APIError{
|
||||
StatusCode: resp.StatusCode,
|
||||
Title: resp.Status,
|
||||
|
|
|
|||
|
|
@ -151,6 +151,7 @@ func TestTooLargeWriteRetry(t *testing.T) {
|
|||
Bucket: "telegraf",
|
||||
BucketTag: "bucket",
|
||||
ExcludeBucketTag: true,
|
||||
Log: testutil.Logger{},
|
||||
}
|
||||
|
||||
client, err := influxdb.NewHTTPClient(config)
|
||||
|
|
|
|||
Loading…
Reference in New Issue