Skip to content

Commit 3f0e14a

Browse files
MINOR: rename metric variable name in Processor#accept (apache#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]>
1 parent 3d96b20 commit 3f0e14a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/scala/kafka/network/SocketServer.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,14 +1159,14 @@ private[kafka] class Processor(
11591159
*/
11601160
def accept(socketChannel: SocketChannel,
11611161
mayBlock: Boolean,
1162-
acceptorIdlePercentMeter: com.yammer.metrics.core.Meter): Boolean = {
1162+
acceptorBlockedPercentMeter: com.yammer.metrics.core.Meter): Boolean = {
11631163
val accepted = {
11641164
if (newConnections.offer(socketChannel))
11651165
true
11661166
else if (mayBlock) {
11671167
val startNs = time.nanoseconds
11681168
newConnections.put(socketChannel)
1169-
acceptorIdlePercentMeter.mark(time.nanoseconds() - startNs)
1169+
acceptorBlockedPercentMeter.mark(time.nanoseconds() - startNs)
11701170
true
11711171
} else
11721172
false

0 commit comments

Comments
 (0)