chia7712 commented on code in PR #20265:
URL: https://github.com/apache/kafka/pull/20265#discussion_r2350226883


##########
storage/src/main/java/org/apache/kafka/storage/internals/log/RemoteStorageThreadPool.java:
##########
@@ -32,7 +32,10 @@
 
 public final class RemoteStorageThreadPool extends ThreadPoolExecutor {
     private static final Logger LOGGER = 
LoggerFactory.getLogger(RemoteStorageThreadPool.class);
-    private final KafkaMetricsGroup metricsGroup = new 
KafkaMetricsGroup(this.getClass());
+    @Deprecated(since = "4.2")
+    // This metrics group is used to register deprecated metrics. It will be 
removed in Kafka 5.0
+    private final KafkaMetricsGroup internalsLogMetricsGroup = new 
KafkaMetricsGroup(this.getClass());

Review Comment:
   Also, should it be named `deprecatedLogMetricsGroup` instead of 
`internalsLogMetricsGroup`?



##########
storage/src/main/java/org/apache/kafka/storage/internals/log/RemoteStorageThreadPool.java:
##########
@@ -32,7 +32,10 @@
 
 public final class RemoteStorageThreadPool extends ThreadPoolExecutor {
     private static final Logger LOGGER = 
LoggerFactory.getLogger(RemoteStorageThreadPool.class);
-    private final KafkaMetricsGroup metricsGroup = new 
KafkaMetricsGroup(this.getClass());
+    @Deprecated(since = "4.2")
+    // This metrics group is used to register deprecated metrics. It will be 
removed in Kafka 5.0
+    private final KafkaMetricsGroup internalsLogMetricsGroup = new 
KafkaMetricsGroup(this.getClass());

Review Comment:
   Could you please use `KafkaMetricsGroup(String, String)` instead to avoid 
breaking the compatibility again?



##########
server/src/main/java/org/apache/kafka/server/AssignmentsManager.java:
##########
@@ -74,8 +74,12 @@ public final class AssignmentsManager {
     /**
      * The metric reflecting the number of pending assignments.

Review Comment:
   Could you please move the comment to the new metric name? it would also be 
helpful to describe the purpose of the deprecated one



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to