Take absolute values when doing DNS jitter. #36953
Check was skipped
This check was not triggered in this CI run
Details
Request (pr/36953/main@d4f758a)
@Stevenjin8 d4f758a
#36953 merge
main@3a1a72e
Take absolute values when doing DNS jitter.
Commit Message: Take absolute values when doing DNS jitter.
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue] #36943
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]In response to #36943. Jitter is generated by taking a random value from the random generator and creating a std::chrono::millisecond.
Since the random value is a uint64, I figured that the resulting std::chrono::millisecond would have to be positive.
However, std::chrono::millisecond uses a int64 under the hood, so large random values were being converted to negative numbers.
For example, if the random generator returned 0x8000000000000000, there would be a jitter of -9223372036854775808ms.
This jitter would in turn case the refresh timer to be negative.
Environment
Request variables
Key | Value |
---|---|
ref | e7e31a4 |
sha | d4f758a |
pr | 36953 |
base-sha | 3a1a72e |
actor | @Stevenjin8 |
message | Take absolute values when doing DNS jitter.... |
started | 1731437528.805574 |
target-branch | main |
trusted | false |
Build image
Container image/s (as used in this CI run)
Key | Value |
---|---|
default | envoyproxy/envoy-build-ubuntu:f94a38f62220a2b017878b790b6ea98a0f6c5f9c |
mobile | envoyproxy/envoy-build-ubuntu:mobile-f94a38f62220a2b017878b790b6ea98a0f6c5f9c |
Version
Envoy version (as used in this CI run)
Key | Value |
---|---|
major | 1 |
minor | 33 |
patch | 0 |
dev | true |