You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/05/19 17:33:28 UTC

[GitHub] [kafka] divijvaidya opened a new pull request, #12184: KAFKA-13911: Fix the rate window size calculation for edge cases

divijvaidya opened a new pull request, #12184:
URL: https://github.com/apache/kafka/pull/12184

   ## Problem
   Implementation of connection creation rate quotas in Kafka is dependent on two configurations:
   [quota.window.num](https://kafka.apache.org/documentation.html#brokerconfigs_quota.window.num) AND [quota.window.size.seconds](https://kafka.apache.org/documentation.html#brokerconfigs_quota.window.size.seconds)
   
   The minimum possible values of these configuration is 1 as per the documentation. However, when we set 1 as the configuration value, we can hit a situation where rate is calculated as NaN (and hence, leads to exceptions). This specific scenario occurs when an event is recorded at the start of a sample window.
   
   ## Solution
   This patch fixes this edge case by ensuring that the windowSize over which Rate is calculated is at least 1ms (even if it is calculated at the start of the sample window).
   
   ## Test
   Added a unit test which fails before the patch and passes after the patch
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] ijuma merged pull request #12184: KAFKA-13911: Fix the rate window size calculation for edge cases

Posted by GitBox <gi...@apache.org>.
ijuma merged PR #12184:
URL: https://github.com/apache/kafka/pull/12184


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] divijvaidya commented on pull request #12184: KAFKA-13911: Fix the rate window size calculation for edge cases

Posted by GitBox <gi...@apache.org>.
divijvaidya commented on PR #12184:
URL: https://github.com/apache/kafka/pull/12184#issuecomment-1156329800

   @dajac @guozhangwang please review when you get a chance.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] divijvaidya commented on pull request #12184: KAFKA-13911: Fix the rate window size calculation for edge cases

Posted by GitBox <gi...@apache.org>.
divijvaidya commented on PR #12184:
URL: https://github.com/apache/kafka/pull/12184#issuecomment-1134632044

   @ijuma perhaps you might want to take a look at this? The test failures are unrelated to the changes and are known flaky failures.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] divijvaidya commented on pull request #12184: KAFKA-13911: Fix the rate window size calculation for edge cases

Posted by GitBox <gi...@apache.org>.
divijvaidya commented on PR #12184:
URL: https://github.com/apache/kafka/pull/12184#issuecomment-1149991389

   @showuon perhaps you want to take a look at this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] dajac commented on pull request #12184: KAFKA-13911: Fix the rate window size calculation for edge cases

Posted by GitBox <gi...@apache.org>.
dajac commented on PR #12184:
URL: https://github.com/apache/kafka/pull/12184#issuecomment-1183371092

   @divijvaidya I am sorry but I did not have the time to look into this one yet and I will be away for the next three weeks. I may be able to take a look when I come back.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] divijvaidya commented on pull request #12184: KAFKA-13911: Fix the rate window size calculation for edge cases

Posted by GitBox <gi...@apache.org>.
divijvaidya commented on PR #12184:
URL: https://github.com/apache/kafka/pull/12184#issuecomment-1183038942

   @tombentley @mimaison Would you like to review this one please?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org