Skip to content
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

MINOR: Support KRaft mode in RequestQuotaTest #12614

Closed
wants to merge 1 commit into from

Conversation

dengziming
Copy link
Member

More detailed description of your change
Support kraft mode in RequestQuotaTest

Summary of testing strategy (including rationale)
QA

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

Copy link
Member Author

@dengziming dengziming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @hachikuji @dajac , please take a look at the problem here, BrokerMetadataPublisher will publish ClientQuotasDelta to brokers, but not to controllers, I'm not sure if it was deliberately designed like this.

@ValueSource(strings = Array("zk", "kraft"))
def testResponseThrottleTime(quorum: String): Unit = {
val apiKeys = if (isKRaftTest()) {
(clientActions ++ clusterActionsWithThrottle).filterNot(_.forwardable)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, ClientQuotasDelta is only published to brokers whereas ControllerApis.QuotaManagers is not updated after we update client quota configs, so all request is not throttled in the controller, so we need to filter forwardable ApiKeys here.

RequestQuotaTest.principal = RequestQuotaTest.UnauthorizedPrincipal

for (apiKey <- ApiKeys.zkBrokerApis.asScala) {
val apiKeys = if (isKRaftTest()) ApiKeys.kraftBrokerApis().asScala.filterNot(_.forwardable) else ApiKeys.zkBrokerApis.asScala
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Contributor

@showuon showuon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only throttling in brokers, not controllers did sound like a bug. The changes make sense to me. Could we fix the build issue first? All 3 builds terminated in core:unittest, which looks like it is caused by this PR. I had a look, but don't have any clue. Do you have any idea?

I triggered the build again, let's see if it is still the same.
https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-12614/2/

Copy link
Contributor

@showuon showuon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a look at https://cwiki.apache.org/confluence/display/KAFKA/KIP-124+-+Request+rate+quotas, looks like the request rate is to throttle the request from client. So, if the client won't sent requests directly to controller, maybe we don't worry about controller here?

@dengziming
Copy link
Member Author

Fixed in #14201

@dengziming dengziming closed this Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants