Skip to content

Add dynamic config#200

Open
fvaleri wants to merge 4 commits into
showuon:cl3from
fvaleri:dynamic-config
Open

Add dynamic config#200
fvaleri wants to merge 4 commits into
showuon:cl3from
fvaleri:dynamic-config

Conversation

@fvaleri

@fvaleri fvaleri commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Add mirror.num.replica.fetchers and mirror.metadata.refresh.interval.ms to AllDynamicConfigs and introduce a DynamicClusterMirrorConfig handler that validates and applies changes at runtime without broker restart.

For mirror.num.replica.fetchers, MirrorFetcherManager overrides resizeThreadPool to redistribute existing partitions across the new thread count.

For mirror.metadata.refresh.interval.ms, ClusterMirrorCoordinator stores the ScheduledFuture returned by the scheduler and exposes rescheduleMetadataRefresh which cancels the old periodic task and schedules a new one with the updated interval.

Add mirror.num.replica.fetchers and mirror.metadata.refresh.interval.ms
to AllDynamicConfigs and introduce a DynamicClusterMirrorConfig handler
that validates and applies changes at runtime without broker restart.

For mirror.num.replica.fetchers, MirrorFetcherManager overrides
resizeThreadPool to redistribute existing partitions across the new
thread count.

For mirror.metadata.refresh.interval.ms, ClusterMirrorCoordinator
stores the ScheduledFuture returned by the scheduler and exposes
rescheduleMetadataRefresh which cancels the old periodic task and
schedules a new one with the updated interval.

Signed-off-by: Federico Valeri <fedevaleri@gmail.com>
@fvaleri

fvaleri commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator Author

KIP updated.

Tested manually and it seems to work fine.

================================================================================
SESSION REPORT (ALL TESTS)
ducktape version: 0.14.0
session_id:       2026-06-12--003
run time:         20 minutes 27.814 seconds
tests run:        24
passed:           24
flaky:            0
failed:           0
ignored:          0
================================================================================

Signed-off-by: Federico Valeri <fedevaleri@gmail.com>

@showuon showuon left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

The change makes sense to me. But have you tested locally at least to update these 2 configs dynamically?

Comment thread core/src/main/scala/kafka/server/BrokerServer.scala Outdated
Comment thread core/src/main/scala/kafka/server/mirror/MirrorFetcherManager.scala Outdated
Signed-off-by: Federico Valeri <fedevaleri@gmail.com>
@fvaleri

fvaleri commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator Author

The change makes sense to me. But have you tested locally at least to update these 2 configs dynamically?

Quoting myself: "Tested manually and it seems to work fine."

Signed-off-by: Federico Valeri <fedevaleri@gmail.com>

@showuon showuon left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants