feat/Broker status - version/image extraction improvements#243
Open
feat/Broker status - version/image extraction improvements#243
Conversation
|
How did you find that slow function (updateStatusWithDockerImageAndVersion)? |
bc10845 to
fbb56a9
Compare
Author
operator was logging status updates for each broker every 5-15s |
dobrerazvan
reviewed
Apr 24, 2026
dobrerazvan
reviewed
Apr 24, 2026
dobrerazvan
reviewed
Apr 24, 2026
Comment on lines
+138
to
+139
| app: kafka-operator | ||
| component: operator |
There was a problem hiding this comment.
Suggested change
| app: kafka-operator | |
| component: operator |
dobrerazvan
reviewed
Apr 24, 2026
Comment on lines
+120
to
+121
| app: kafka-operator | ||
| component: operator |
There was a problem hiding this comment.
Suggested change
| app: kafka-operator | |
| component: operator |
dobrerazvan
reviewed
Apr 24, 2026
| r.KafkaCluster.Spec.GetClusterImage(), r.KafkaCluster.Spec.HeadlessServiceEnabled) | ||
| if err != nil { | ||
| return err | ||
| func (r *Reconciler) updateStatusWithDockerImageAndVersion(brokers map[int32]*banzaiv1beta1.BrokerConfig, log logr.Logger) error { |
There was a problem hiding this comment.
Goroutines have no cancellation path. If the controller shuts down mid-reconcile, these goroutines run to completion (or until JMX times out). Worth passing a context.Context from the reconcile call if JMX extraction can be long-running.
dobrerazvan
reviewed
Apr 24, 2026
| result := <-ch | ||
| if result.err != nil { | ||
| return result.err | ||
| } |
There was a problem hiding this comment.
Drain the hole channel first then update the broker status so all or none are updated.
Co-authored-by: Razvan Dobre <dobre@adobe.com>
Co-authored-by: Razvan Dobre <dobre@adobe.com>
fbbb905 to
a81b695
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Performance improvements: parallel scrape for broker version and image.
Type of Change
Checklist