From 4fd0d8cb8dba589c43bd4803a4e32aa2a508d755 Mon Sep 17 00:00:00 2001 From: Krishna Ravishankar Date: Wed, 27 Sep 2023 15:19:34 -0400 Subject: [PATCH 1/3] Adding some extra logs to test autothrottle --- cmd/autothrottle/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/autothrottle/main.go b/cmd/autothrottle/main.go index 90d78d59..da167857 100644 --- a/cmd/autothrottle/main.go +++ b/cmd/autothrottle/main.go @@ -245,8 +245,10 @@ func main() { // the Kafka topic throttled replicas list. This minimizes // state that must be propagated through the cluster. if topicsReplicatingNow.isSubSet(topicsReplicatingPreviously) { + log.Println("No new topics to throttle, disable topic updates") throttleManager.DisableTopicUpdates() } else { + log.Println("New topics to throttle, disable topic updates") throttleManager.EnableTopicUpdates() // Unset any previously stored throttle rates. This is done to avoid a // scenario that results in autothrottle being unaware of externally @@ -351,8 +353,10 @@ func main() { } if brokersThrottledNow.equal(brokersThrottledPreviously) { + log.Println("No new brokers to throttle, disable topic updates") throttleManager.DisableOverrideTopicUpdates() } else { + log.Println("New brokers to throttle, enable topic updates") throttleManager.EnableOverrideTopicUpdates() } From 3cf38f474885c1af86f09e9f1c9125ffc28cd64e Mon Sep 17 00:00:00 2001 From: Krishna Ravishankar Date: Thu, 28 Sep 2023 10:04:09 -0400 Subject: [PATCH 2/3] Adding some extra logs to test autothrottle --- cmd/autothrottle/main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/autothrottle/main.go b/cmd/autothrottle/main.go index da167857..19c443c1 100644 --- a/cmd/autothrottle/main.go +++ b/cmd/autothrottle/main.go @@ -245,10 +245,10 @@ func main() { // the Kafka topic throttled replicas list. This minimizes // state that must be propagated through the cluster. if topicsReplicatingNow.isSubSet(topicsReplicatingPreviously) { - log.Println("No new topics to throttle, disable topic updates") + log.Println("No new reassigning topics to throttle, disable topic updates") throttleManager.DisableTopicUpdates() } else { - log.Println("New topics to throttle, disable topic updates") + log.Println("New reassigning topics to throttle, enable topic updates") throttleManager.EnableTopicUpdates() // Unset any previously stored throttle rates. This is done to avoid a // scenario that results in autothrottle being unaware of externally @@ -336,6 +336,8 @@ func main() { // TODO(jamie): is there a scenario where we should exclude topics // have also have a reassignment? We're discovering topics here by // reverse lookup of brokers that are not reassignment participants. + log.Println("There are broker overrides") + log.Print(throttleManager.GetBrokerOverrides()) var err error otl, err := throttleManager.GetTopicsWithThrottledBrokers() if err != nil { From 42bf3383fc12b998f5ebd5b3b02692ac9014895b Mon Sep 17 00:00:00 2001 From: Krishna Ravishankar Date: Thu, 28 Sep 2023 12:26:34 -0400 Subject: [PATCH 3/3] Adding some extra logs to test autothrottle --- cmd/autothrottle/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/autothrottle/main.go b/cmd/autothrottle/main.go index 19c443c1..1f925be9 100644 --- a/cmd/autothrottle/main.go +++ b/cmd/autothrottle/main.go @@ -348,12 +348,13 @@ func main() { // Determine whether we need to propagate topic throttle replica // list configs. If the brokers with overrides remains the same, - // we don't need to need to update those configs. + // we don't need to update those configs. var brokersThrottledNow = newSet() for broker := range activeOverrideBrokers { brokersThrottledNow.add(strconv.Itoa(broker)) } - + log.Printf("BrokersThrottledNow: %v", brokersThrottledNow) + log.Printf("BrokersThrottledPreviously: %v", brokersThrottledPreviously) if brokersThrottledNow.equal(brokersThrottledPreviously) { log.Println("No new brokers to throttle, disable topic updates") throttleManager.DisableOverrideTopicUpdates()