Skip to content

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

Merged
chia7712 merged 5 commits intoapache:trunkfrom
mingdaoy:KAFKA-18399
Jan 14, 2025
Merged

KAFKA-18399 Remove ZooKeeper from KafkaApis (9/N): ALTER_CLIENT_QUOTAS and ALLOCATE_PRODUCER_IDS#18465
chia7712 merged 5 commits intoapache:trunkfrom
mingdaoy:KAFKA-18399

Conversation

@mingdaoy
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

@mingdaoy please fix the conflicts

@chia7712
Copy link
Copy Markdown
Member

@mingdaoy please fix the conflicts, thanks!

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

mingdaoy commented Jan 14, 2025

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

Copy link
Copy Markdown
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
@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 <ismael@juma.me.uk>, Chia-Ping Tsai <chia7712@gmail.com>
pranavt84 pushed a commit to pranavt84/kafka that referenced this pull request Jan 27, 2025
…S and ALLOCATE_PRODUCER_IDS (apache#18465)

Reviewers: Ismael Juma <ismael@juma.me.uk>, Chia-Ping Tsai <chia7712@gmail.com>
airlock-confluentinc Bot pushed a commit to confluentinc/kafka that referenced this pull request Jan 27, 2025
…S and ALLOCATE_PRODUCER_IDS (apache#18465)

Reviewers: Ismael Juma <ismael@juma.me.uk>, Chia-Ping Tsai <chia7712@gmail.com>
manoj-mathivanan pushed a commit to manoj-mathivanan/kafka that referenced this pull request Feb 19, 2025
…S and ALLOCATE_PRODUCER_IDS (apache#18465)

Reviewers: Ismael Juma <ismael@juma.me.uk>, Chia-Ping Tsai <chia7712@gmail.com>
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