I’ve set up a process in my application that allows me to send a request to a Golang InfluxDB client, such that a user can update a bucket’s retention time. The form to update the time takes in a number of days, converts that into seconds and then sends that number to the Golang client to update the requested bucket.
However, when I enter a number of days equal to, say, 99999, I will be returned an error from the client: unprocessable entity: expiration seconds must be greater than or equal to one second
This does not seem to be a problem with magnitude because I can go to a higher amount of days - like 100000 - and the process will work as intended. However it seems to be that a large number of 9s in days causes this problem.
large number of 9s in days
are you creating buckets with retentions of seconds or days?
Finally, can you please share some of your go client code?
Thanks
@jos it looks to me like you’re hitting an int overflow when some piece of the system converts seconds → time.Duration (nanoseconds), I’ll try to track it down. The end result will likely still be an error, but with a more-understandable message.
@dan-moran I should clarify that my retention value has been in days, not seconds (that is, the bug happens when I chose 99999 days, not 99999 seconds)