strimzi-kafka-operator
strimzi-kafka-operator copied to clipboard
Optimize dynamic update of kafka brokers
I believe there will be a room for some improvements. For now I can see one in this part of algorithm:
When the custom property in spec.kafka.config
is changed, we want to roll. So it is unnecessary to go though entire algorithm (creating adminClient, fetching conf, computing diff,...)
We can do something like
String oldHash = this.kafkaBrokerConfigurationHash;
this.kafkaBrokerConfigurationHash += getStringHash(kc.unknownConfigsWithValues(kafkaCluster.getKafkaVersion()).toString());
bool customConfChanged = !this.kafkaBrokerConfigurationHash.equals(oldHash);
This is valid after https://github.com/strimzi/strimzi-kafka-operator/pull/2389 is merged.
Triaged on 31.3.2022: Seems to be valid, but not critical, so one day we might get to it.