strimzi / strimzi-kafka-operator

Apache Kafka® running on Kubernetes
https://strimzi.io/
Apache License 2.0
4.81k stars 1.29k forks source link

Optimize dynamic update of kafka brokers #3130

Open sknot-rh opened 4 years ago

sknot-rh commented 4 years ago

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.

scholzj commented 2 years ago

Triaged on 31.3.2022: Seems to be valid, but not critical, so one day we might get to it.