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

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


The following commit(s) were added to refs/heads/trunk by this push:
     new 3f0e14a3e8b MINOR: rename metric variable name in Processor#accept 
(#19361)
3f0e14a3e8b is described below

commit 3f0e14a3e8b6c5effbe60612d8bdd1526dd270b4
Author: Gaurav Narula <[email protected]>
AuthorDate: Sat Apr 5 15:54:21 2025 +0100

    MINOR: rename metric variable name in Processor#accept (#19361)
    
    `Processor#accept` accepts a metric which tracks the amount of time for
    which the Acceptor thread was blocked. It's misleading to name it
    `acceptorIdlePercentMeter` and this change updates its naming to align
    with the call site.
    
    Reviewers: PoAn Yang <[email protected]>, Chia-Ping Tsai
    <[email protected]>
---
 core/src/main/scala/kafka/network/SocketServer.scala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/src/main/scala/kafka/network/SocketServer.scala 
b/core/src/main/scala/kafka/network/SocketServer.scala
index 42e2e609379..c520b17fa06 100644
--- a/core/src/main/scala/kafka/network/SocketServer.scala
+++ b/core/src/main/scala/kafka/network/SocketServer.scala
@@ -1159,14 +1159,14 @@ private[kafka] class Processor(
    */
   def accept(socketChannel: SocketChannel,
              mayBlock: Boolean,
-             acceptorIdlePercentMeter: com.yammer.metrics.core.Meter): Boolean 
= {
+             acceptorBlockedPercentMeter: com.yammer.metrics.core.Meter): 
Boolean = {
     val accepted = {
       if (newConnections.offer(socketChannel))
         true
       else if (mayBlock) {
         val startNs = time.nanoseconds
         newConnections.put(socketChannel)
-        acceptorIdlePercentMeter.mark(time.nanoseconds() - startNs)
+        acceptorBlockedPercentMeter.mark(time.nanoseconds() - startNs)
         true
       } else
         false

Reply via email to