-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting retry_initial_backoff_secs
or retry_max_duration_secs
causes vector panic
#20890
Labels
type: bug
A code related bug.
Comments
dhable
added a commit
to dhable/vector
that referenced
this issue
Jul 19, 2024
Change `retry_initial_backoff_secs` and `retry_initial_backoff_secs` from `u64` to `NonZeroU64` to prevent divide by zero panic at runtime. Fixes: vectordotdev#20890
dhable
added a commit
to dhable/vector
that referenced
this issue
Jul 19, 2024
Change `retry_initial_backoff_secs` and `retry_initial_backoff_secs` from `u64` to `NonZeroU64` to prevent divide by zero panic at runtime. Fixes: vectordotdev#20890
Thanks for the report and PR @dhable ! |
dhable
added a commit
to dhable/vector
that referenced
this issue
Jul 22, 2024
Change `retry_initial_backoff_secs` and `retry_initial_backoff_secs` from `u64` to `NonZeroU64` to prevent divide by zero panic at runtime. Fixes: vectordotdev#20890
github-merge-queue bot
pushed a commit
that referenced
this issue
Jul 24, 2024
Change `retry_initial_backoff_secs` and `retry_initial_backoff_secs` from `u64` to `NonZeroU64` to prevent divide by zero panic at runtime. Fixes: #20890
ym
pushed a commit
to ym/vector
that referenced
this issue
Aug 18, 2024
Change `retry_initial_backoff_secs` and `retry_initial_backoff_secs` from `u64` to `NonZeroU64` to prevent divide by zero panic at runtime. Fixes: vectordotdev#20890
AndrooTheChen
pushed a commit
to discord/vector
that referenced
this issue
Sep 23, 2024
Change `retry_initial_backoff_secs` and `retry_initial_backoff_secs` from `u64` to `NonZeroU64` to prevent divide by zero panic at runtime. Fixes: vectordotdev#20890
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A note for the community
Problem
The configuration fields for
retry_initial_backoff_secs
andretry_max_duration_secs
inTowerRequestConfig
accept any valid u64 values, including 0. Setting either of these fields to 0 causes theFibonacciRetryPolicy
to panic with a divide by 0 error.The crash when
retry_initial_backoff_secs
is set to 0 happens on startup with a vague error message.The panic when
retry_max_duration_secs
is 0 is worse since it only happens once the sink attempts a retry, which could be some time later.It seems like using
NonZeroU64
for these fields inTowerRequestConfig
would prevent the issue when the config is parsed and provide a more helpful error message to the user.Configuration
Version
0.35.1
Debug Output
No response
Example Data
No response
Additional Context
Zero values were tolerated in the config prior to the introduction of
FibonacciRetryPolicy
since those arithmetic operations didn't depend on division with the configuration values.References
No response
The text was updated successfully, but these errors were encountered: