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 (4/N): CREATE_TOPICS, DELETE_TOPICS, CREATE_PARTITIONS #18433

Open
wants to merge 5 commits into
base: trunk
Choose a base branch
from

Conversation

TaiJuWu
Copy link
Contributor

@TaiJuWu TaiJuWu commented Jan 8, 2025

*More detailed description of your change

Delete follow KafkaApi handler

  • handleCreateTopicsRequest
  • handleDeleteTopicsRequest
  • handleCreatePartitionsRequest

In Kraft mode, all requests are forwarded to controller and all authorization is not work so I delete some tests.

Forwarding test already cover by

  • testCreateTopicsWithForwarding
  • testDeleteTopicsWithForwarding
  • testCreatePartitionsWithForwarding

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 labels Jan 8, 2025
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.

@TaiJuWu thanks for this patch.

@@ -212,8 +208,8 @@ class KafkaApis(val requestChannel: RequestChannel,
case ApiKeys.LIST_GROUPS => handleListGroupsRequest(request).exceptionally(handleError)
case ApiKeys.SASL_HANDSHAKE => handleSaslHandshakeRequest(request)
case ApiKeys.API_VERSIONS => handleApiVersionsRequest(request)
case ApiKeys.CREATE_TOPICS => maybeForwardToController(request, handleCreateTopicsRequest)
case ApiKeys.DELETE_TOPICS => maybeForwardToController(request, handleDeleteTopicsRequest)
case ApiKeys.CREATE_TOPICS => maybeForwardToController(request, null)
Copy link
Member

Choose a reason for hiding this comment

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

we should use KafkaApis.shouldAlwaysForward to replace null

case ApiKeys.CREATE_TOPICS => maybeForwardToController(request, handleCreateTopicsRequest)
case ApiKeys.DELETE_TOPICS => maybeForwardToController(request, handleDeleteTopicsRequest)
case ApiKeys.CREATE_TOPICS => maybeForwardToController(request, null)
case ApiKeys.DELETE_TOPICS => maybeForwardToController(request, null)
Copy link
Member

Choose a reason for hiding this comment

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

ditto

@@ -230,7 +226,7 @@ class KafkaApis(val requestChannel: RequestChannel,
case ApiKeys.ALTER_REPLICA_LOG_DIRS => handleAlterReplicaLogDirsRequest(request)
case ApiKeys.DESCRIBE_LOG_DIRS => handleDescribeLogDirsRequest(request)
case ApiKeys.SASL_AUTHENTICATE => handleSaslAuthenticateRequest(request)
case ApiKeys.CREATE_PARTITIONS => maybeForwardToController(request, handleCreatePartitionsRequest)
case ApiKeys.CREATE_PARTITIONS => maybeForwardToController(request, null)
Copy link
Member

Choose a reason for hiding this comment

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

ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All comments are address, thanks!

@TaiJuWu TaiJuWu requested a review from chia7712 January 9, 2025 02:15
@github-actions github-actions bot removed the triage PRs from the community label Jan 9, 2025
@TaiJuWu TaiJuWu changed the title KAFKA-18399 Remove ZooKeeper from KafkaApis (part 4): handleCreateTopicsRequest, handleDeleteTopicsRequest, handleCreatePartitionsRequest KAFKA-18399 Remove ZooKeeper from KafkaApis (4/N): handleCreateTopicsRequest, handleDeleteTopicsRequest, handleCreatePartitionsRequest Jan 9, 2025
@TaiJuWu TaiJuWu changed the title KAFKA-18399 Remove ZooKeeper from KafkaApis (4/N): handleCreateTopicsRequest, handleDeleteTopicsRequest, handleCreatePartitionsRequest KAFKA-18399 Remove ZooKeeper from KafkaApis (4/N): CREATE_TOPICS, DELETE_TOPICS, CREATE_PARTITIONS Jan 9, 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.

2 participants