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

KAFKA-18399 Remove ZooKeeper from KafkaApis (9/N): ALTER_CLIENT_QUOTAS and ALLOCATE_PRODUCER_IDS #18465

Merged
merged 5 commits into from
Jan 14, 2025

Conversation

mingdaoy
Copy link
Contributor

@mingdaoy mingdaoy commented Jan 9, 2025

https://issues.apache.org/jira/browse/KAFKA-18399

Committer Checklist (excluded from commit message)

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

@github-actions github-actions bot added triage PRs from the community core Kafka Broker small Small PRs labels Jan 9, 2025
requestHelper.sendResponseMaybeThrottle(request, throttleTimeMs =>
new AllocateProducerIdsResponse(producerIdsResponse.setThrottleTimeMs(throttleTimeMs)))
)
throw KafkaApis.shouldNeverReceive(request)
Copy link
Member

Choose a reason for hiding this comment

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

I think we shouldn't handle it like this - this is one of the request types that is only handled by the controller listener (now that zk is gone):

"listeners": ["zkBroker", "controller"]

So, we should have generic logic that handles that automatically before it gets here. We can probably just delete this whole method.

Copy link
Member

Choose a reason for hiding this comment

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

Same for handleAlterClientQuotasRequest.

Copy link
Member

Choose a reason for hiding this comment

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

So, we should have generic logic that handles that automatically before it gets here. We can probably just delete this whole method.

totally agree that we should have a generic logic for those zk-related handler. The socket server can reject the zk-related requests automatically, and we can rewrite maybeForwardToController to throw KafkaApis.shouldAlwaysForward automatically. With those change, those zk-related handlers can be deleted directly.

In short, the line case ApiKeys.ALLOCATE_PRODUCER_IDS => handleAllocateProducerIdsRequest(request) can be removed.

Copy link
Member

@ijuma ijuma Jan 10, 2025

Choose a reason for hiding this comment

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

Yes, exactly. We can also remove the zk listener from the json files and the socket server will automatically do the right thing, I believe (i.e. it already has logic for that).

Copy link
Member

Choose a reason for hiding this comment

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

We can also remove the zk listener from the json files

open https://issues.apache.org/jira/browse/KAFKA-18474

@github-actions github-actions bot removed the triage PRs from the community label Jan 11, 2025
@chia7712
Copy link
Member

@mingdaoy please fix the conflicts

@chia7712
Copy link
Member

@mingdaoy please fix the conflicts, thanks!

Copy link
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

@mingdaoy thanks for this patch!

@@ -2580,34 +2580,7 @@ class KafkaApis(val requestChannel: RequestChannel,
}

def handleAlterClientQuotasRequest(request: RequestChannel.Request): Unit = {
Copy link
Member

Choose a reason for hiding this comment

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

please remove this unused method and its related test

@@ -2813,19 +2782,7 @@ class KafkaApis(val requestChannel: RequestChannel,
}

def handleAllocateProducerIdsRequest(request: RequestChannel.Request): Unit = {
Copy link
Member

Choose a reason for hiding this comment

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

please remove this handle also

@github-actions github-actions bot removed the small Small PRs label Jan 13, 2025
@mingdaoy
Copy link
Contributor Author

mingdaoy commented Jan 14, 2025

I observed that flaky test failures have been reported.
KAFKA-16024
KAFKA-17464
KAFKA-18031

Copy link
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

LGTM and the failed tests pass on my local

@chia7712 chia7712 merged commit 9f95597 into apache:trunk Jan 14, 2025
5 of 7 checks passed
@chia7712 chia7712 changed the title KAFKA-18399 Remove ZooKeeper from KafkaApis (10/N): ALTER_CLIENT_QUOTAS, handleAllocateProducerIdsRequest KAFKA-18399 Remove ZooKeeper from KafkaApis (9/N): ALTER_CLIENT_QUOTAS and ALLOCATE_PRODUCER_IDS Jan 14, 2025
chia7712 pushed a commit that referenced this pull request Jan 14, 2025
…S and ALLOCATE_PRODUCER_IDS (#18465)

Reviewers: Ismael Juma <[email protected]>, Chia-Ping Tsai <[email protected]>
askew pushed a commit to askew/kafka that referenced this pull request Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants