KAFKA-2209 - Change quotas dynamically using DynamicConfigManager#298
KAFKA-2209 - Change quotas dynamically using DynamicConfigManager#298auradkar wants to merge 10 commits intoapache:trunkfrom
Conversation
There was a problem hiding this comment.
Do you really just want to record a 0 value?
There was a problem hiding this comment.
The idea was to change the quota and test that the throttle time is 0 for the new quota.
Recording a 0 doesn't change the underlying value. It is basically trying to verify that new quota is applied and doesn't throttle on the previously recorded value.
There was a problem hiding this comment.
If the client is not throttled, the throttle-time should always be 0, right? Is there a need to for using EPS? Ditto below.
There was a problem hiding this comment.
The assertEquals(expected, actual) method has been deprecated, so I used the assertEquals(expected, actual, delta) method. I can set the delta to zero in this case.
|
Also, in ClientQuotaManager.recordAndMaybeThrottle(), it seems that we shouldn't record throttleTimeMs, if it's 0. Otherwise, it will skew the computation of Avg(). |
|
I suppose we could interpret it 2 ways:
|
|
Thanks for the patch. LGTM. Could you rebase? Also, is assertEquals(expected, actual) really deprecated? You are using that in testClientQuotaConfigChange() too. |
|
Rebased and published a new patch. And yes, assertEquals is deprecated for the versions that compares "double" or "float". The one in testClientQuotaConfigChange compares the Quota object directly so no "delta" parameter on the method. |
|
Could you rebase again? Guozhang just pushed a big patch on the new consumer. |
Changes in this patch are: