jlprat commented on code in PR #15279: URL: https://github.com/apache/kafka/pull/15279#discussion_r1473125018
########## core/src/main/scala/kafka/network/RequestChannel.scala: ########## @@ -92,18 +92,18 @@ object RequestChannel extends Logging { val envelope: Option[RequestChannel.Request] = None) extends BaseRequest { // These need to be volatile because the readers are in the network thread and the writers are in the request // handler threads or the purgatory threads - @volatile var requestDequeueTimeNanos = -1L - @volatile var apiLocalCompleteTimeNanos = -1L - @volatile var responseCompleteTimeNanos = -1L - @volatile var responseDequeueTimeNanos = -1L - @volatile var messageConversionsTimeNanos = 0L - @volatile var apiThrottleTimeMs = 0L - @volatile var temporaryMemoryBytes = 0L + @volatile var requestDequeueTimeNanos: Long = -1L + @volatile var apiLocalCompleteTimeNanos: Long = -1L + @volatile var responseCompleteTimeNanos: Long = -1L + @volatile var responseDequeueTimeNanos: Long = -1L + @volatile var messageConversionsTimeNanos: Long = 0L + @volatile var apiThrottleTimeMs: Long = 0L + @volatile var temporaryMemoryBytes: Long = 0L @volatile var recordNetworkThreadTimeCallback: Option[Long => Unit] = None @volatile var callbackRequestDequeueTimeNanos: Option[Long] = None @volatile var callbackRequestCompleteTimeNanos: Option[Long] = None - val session = Session(context.principal, context.clientAddress) + val session: Session = Session(context.principal, context.clientAddress) Review Comment: The changes made in this PR reflect the current (as per 2.12 and 2.13) idiomatic way to write Scala. For example: Boolean parameters should be named, idempotent methods that are parameterless can be omit the parenthesis, side-effecting parameterless methods should include the parenthesis, and so on -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org