influxdata / influxdata/influxdb
500 error on writing to an invalid retention
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
Writing data with an invaild rentention policy should result in a 4xx error that the client can understand not to retry sending the data. It's expected behavior that 5xx errors received by clients should result in the client re-transmitting the same data to avoid data loss.
This issue was raised by a customer here [influxdata/telegraf/issues/9211](https://github.com/influxdata/telegraf/issues/9211)
A very similar issue was raised here [influxdata/influxdb/issues/20359](https://github.com/influxdata/influxdb/issues/20359)
__Steps to reproduce:__
1. setup influxdb v1
2. curl with an invaild retention policy
ex. `curl "http://localhost:8186/write?db=telegraf&rp=invalid" -d "test value=1"`
__Expected behavior:__
server responds with an error indicating client error, eg 4xx. such as. `406 Not Acceptable` or some other error letting the user know it is an issue with what they are passing and not a server error
__Actual behavior:__
Server responds with 500 Internal Server Error
__Environment info:__
*InfluxDB version: 1.x
Contributor guide
Research direction
Reproduce the behavior against InfluxDB v1 using the provided curl request with an invalid retention policy. Trace the write request's error handling to determine why this client error becomes HTTP 500; done means the request returns an appropriate 4xx response that clients will not retry as a server failure.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100