-
Notifications
You must be signed in to change notification settings - Fork 597
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
Fix for "Expected quota value mismatch" failure in CDT and UTs #8623
Conversation
Some internal namespace functions are exposed via `kafka::detail` ns specifically for the tests. Tests include some specific cases and attempt for random driven generalization in the dispense_equally_test(). The latter also includes a specific value to reproduce redpanda-data#8613.
The minimum boundary for thoughput limit properties was originally `ss::smp::count` so that each shard would not get a zero default quota. Later that was changed to dynamic boundary control, while the static property minimum was changed to a constant `1` so that there is no situation when cluter properties replayed from the controller log were out of property bounds if smp::count on the node is different from the node where the configuration was made. However the change for kafka_throughput_limit_node_out_bps was left behind.
ea3ba07
to
459505e
Compare
Force push: sample numbers in |
CI Failure in https://buildkite.com/redpanda/redpanda/builds/22535#01861e0d-fc75-47d6-b63c-49c60f12f7e5:
|
std::uniform_int_distribution<quota_t> dist( | ||
bottomless_token_bucket::min_quota, bottomless_token_bucket::max_quota); | ||
|
||
for (size_t shards_count = 1; shards_count != 65; ++shards_count) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: shards_count < 65
@@ -464,10 +464,10 @@ void dispense_equally(std::vector<quota_t>& target, const quota_t value) { | |||
v += share.quot; | |||
if (share.rem > 0) { | |||
v += 1; | |||
share.quot -= 1; | |||
share.rem -= 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we write a unit test for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dlex follow up?
Fixes #8613
UTs are added for some specific cases with algorithm used internally by
snc_quota_manager
. An attempt made for random driven generalization in the dispense_equally_test(). The latter also includes a specific value to reproduce #8613.Also tailgated is a tiny fix for the lower boundary of
kafka_throughput_limit_node_out_bps
cluster property.Backports Required
UX Changes
Release Notes