This is an automated email from the ASF dual-hosted git repository.

mimaison pushed a commit to branch 3.8
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/3.8 by this push:
     new 232285e5342 KAFKA-17749: Fix Throttler metrics name (#17430)
232285e5342 is described below

commit 232285e5342dfab28eafddb474b011e99394b930
Author: Mickael Maison <[email protected]>
AuthorDate: Thu Oct 10 17:38:26 2024 +0200

    KAFKA-17749: Fix Throttler metrics name (#17430)
    
    
    Reviewers: Josep Prat <[email protected]>
---
 docs/upgrade.html                                                      | 3 +++
 .../main/java/org/apache/kafka/storage/internals/utils/Throttler.java  | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/docs/upgrade.html b/docs/upgrade.html
index 7261b95e168..1b79daa2d57 100644
--- a/docs/upgrade.html
+++ b/docs/upgrade.html
@@ -90,6 +90,9 @@
             For example, this could be done via the <code>KAFKA_OPTS</code> 
environment variable like follows: <code>export 
KAFKA_OPTS="-DZstdTempFolder=/opt/kafka/tmp 
-Dorg.xerial.snappy.tempdir=/opt/kafka/tmp"</code>.
             This is a known issue for version 3.8.0.
         </li>
+        <li>In 3.8.0 the <code>kafka.utils.Thottler</code> metric was 
accidentally renamed to 
<code>org.apache.kafka.storage.internals.utils.Throttler</code>.
+            This change has been reverted and the metric is now named 
<code>kafka.utils.Thottler</code> again.
+        </li>
     </ul>
 
     <h5><a id="upgrade_380_notable" href="#upgrade_380_notable">Notable 
changes in 3.8.0</a></h5>
diff --git 
a/storage/src/main/java/org/apache/kafka/storage/internals/utils/Throttler.java 
b/storage/src/main/java/org/apache/kafka/storage/internals/utils/Throttler.java
index 6622f2f57de..dab360208b9 100644
--- 
a/storage/src/main/java/org/apache/kafka/storage/internals/utils/Throttler.java
+++ 
b/storage/src/main/java/org/apache/kafka/storage/internals/utils/Throttler.java
@@ -60,7 +60,8 @@ public class Throttler {
                      Time time) {
         this.desiredRatePerSec = desiredRatePerSec;
         this.checkIntervalNs = TimeUnit.MILLISECONDS.toNanos(checkIntervalMs);
-        this.meter = new 
KafkaMetricsGroup(Throttler.class).newMeter(metricName, units, 
TimeUnit.SECONDS);
+        // For compatibility - this metrics group was previously defined 
within a Scala class named `kafka.utils.Throttler`
+        this.meter = new KafkaMetricsGroup("kafka.utils", 
"Throttler").newMeter(metricName, units, TimeUnit.SECONDS);
         this.time = time;
         this.periodStartNs = time.nanoseconds();
     }

Reply via email to