Decide if option is custom or not in a single place #10643
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of change
Description
We have currently two places to decide if a Kafka configuration option is custom or not. One in
KafkaBrokerConfigurationDiff
and another one inKafkaConfiguration
. And they are both used for the same purpose - to determine if the option is custom and requires a rolling of the Kafka broker or whether it is not custom and can be possibly updated dynamically through Kafka API.So having this done in two places is dangerous because the option should be always either one or the other. And by having it done in two places means that we face a risk that one day someone updates only one part. This PR creates a public method in the
KafkaConfiguration
class that is used in both places and help to mitigate the risk. (+ it fixes one or two minor IDE warnings in the same class)Checklist