Skip to content

MINOR: Provide default no-op implementations for addReconfigurable and removeReconfigurable in AbstractKafkaConfig#22342

Merged
chia7712 merged 1 commit into
apache:trunkfrom
majialoong:provide_no-op_AbstractKafkaConfig
May 24, 2026
Merged

MINOR: Provide default no-op implementations for addReconfigurable and removeReconfigurable in AbstractKafkaConfig#22342
chia7712 merged 1 commit into
apache:trunkfrom
majialoong:provide_no-op_AbstractKafkaConfig

Conversation

@majialoong
Copy link
Copy Markdown
Contributor

@majialoong majialoong commented May 21, 2026

Ref: #22302 (comment).
Convert addReconfigurable and removeReconfigurable from abstract to
default no-op methods so tests no longer need to supply dummy overrides.

Reviewers: Ken Huang s7133700@gmail.com, Murali Basani
muralidhar.basani@aiven.io, Chia-Ping Tsai chia7712@gmail.com

…d removeReconfigurable in AbstractKafkaConfig
@github-actions github-actions Bot added core Kafka Broker small Small PRs triage PRs from the community labels May 21, 2026
*
* @param reconfigurable the component to register for configuration updates
*/
public abstract void addReconfigurable(Reconfigurable reconfigurable);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There are currently 5 dependants for this
NodeToControllerChannelManagerImpl, SocketServer, TransactionMarkerChannelManager, NetworkUtils and BrokerBlockingSender. These are fine as they have already overriden those methds. But any new classes which are not overriding would not receive any dynamic updates, (as there will not be any compile errors, )where they are supposed to ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch. To clarify, the 5 classes you listed are callers of addReconfigurable, not subclasses of AbstractKafkaConfig, so this change doesn't affect them.

Today, the only production subclass is kafka.server.KafkaConfig, and it still overrides both methods by delegating to dynamicConfig.

My understanding is that these methods are transitional for the KAFKA-15853 migration: AbstractKafkaConfig is intended to become the future KafkaConfig, so the current dynamicConfig-backed implementation in KafkaConfig should eventually move here as part of that migration.

Please let me know if my understanding is incorrect.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah right, thanks for the clarification. That migration should cover it up. If DynamicBrokerConfig is moved to server, may be thse defaults go away.

@github-actions github-actions Bot removed the triage PRs from the community label May 23, 2026
Copy link
Copy Markdown
Collaborator

@m1a2st m1a2st left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

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

@chia7712 chia7712 merged commit 2922b05 into apache:trunk May 24, 2026
29 checks passed
@majialoong majialoong deleted the provide_no-op_AbstractKafkaConfig branch May 24, 2026 09:18
nileshkumar3 pushed a commit to nileshkumar3/kafka that referenced this pull request May 25, 2026
…d removeReconfigurable in AbstractKafkaConfig (apache#22342)

Ref: apache#22302 (comment).
Convert `addReconfigurable` and `removeReconfigurable` from abstract to
default no-op methods so tests no longer need to supply dummy overrides.

Reviewers: Ken Huang <s7133700@gmail.com>, Murali Basani
 <muralidhar.basani@aiven.io>, 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

ci-approved core Kafka Broker small Small PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants