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-18446:Remove MetadataCacheControllerNodeProvider #18437

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

Conversation

gongxuanzhang
Copy link
Contributor

Fix Issue
format import by spotless

@github-actions github-actions bot added triage PRs from the community core Kafka Broker small Small PRs labels Jan 8, 2025
@gongxuanzhang gongxuanzhang changed the title Removezkmetadata KAFKA-18446:Remove MetadataCacheControllerNodeProvider Jan 8, 2025
Copy link
Member

@FrankYang0529 FrankYang0529 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

@chia7712
Copy link
Member

chia7712 commented Jan 8, 2025

@gongxuanzhang please fix the conflicts

…etadata

# Conflicts:
#	core/src/main/scala/kafka/server/NodeToControllerChannelManager.scala
@gongxuanzhang gongxuanzhang reopened this Jan 9, 2025
@gongxuanzhang
Copy link
Contributor Author

@chia7712 PTAL

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.

@gongxuanzhang thanks for this patch!

zkControllerListenerName,
zkControllerSecurityProtocol,
zkControllerSaslMechanism,
isZkController = true)
Copy link
Member

Choose a reason for hiding this comment

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

Could you please remove isZkController and isNetworkClientForZkController from this class file?

@github-actions github-actions bot removed the triage PRs from the community label Jan 9, 2025
@gongxuanzhang gongxuanzhang reopened this Jan 9, 2025
@github-actions github-actions bot added the triage PRs from the community label Jan 9, 2025
@gongxuanzhang
Copy link
Contributor Author

@chia7712 PTAL

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.

@gongxuanzhang thanks for this patch. two minor comments are left

@@ -244,7 +210,6 @@ case class NodeToControllerQueueItem(

class NodeToControllerRequestThread(
initialNetworkClient: KafkaClient,
var isNetworkClientForZkController: Boolean,
networkClientFactory: ControllerInformation => KafkaClient,
Copy link
Member

Choose a reason for hiding this comment

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

networkClientFactory can be removed now

isNetworkClientForZkController = controllerInformation.isZkController
updateControllerAddress(controllerInformation.node.orNull)
controllerInformation.node.foreach(n => metadataUpdater.setNodes(Seq(n).asJava))
networkClient = networkClientFactory(controllerInformation)
Copy link
Member

Choose a reason for hiding this comment

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

we don't change networkClient anymore, so networkClient can be declared as final variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-approved core Kafka Broker small Small PRs triage PRs from the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants