You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "huxihx (JIRA)" <ji...@apache.org> on 2017/09/26 09:42:00 UTC

[jira] [Updated] (KAFKA-5976) RequestChannel.sendReponse records incorrect size for NetworkSend with TRACE logging

     [ https://issues.apache.org/jira/browse/KAFKA-5976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

huxihx updated KAFKA-5976:
--------------------------
    Description: 
In RequestChannel.scala, RequestChannel.sendResponse records incorrect size for `NetworkSend` when trace logging is enabled, as shown below:

{code:title=RequestChannel.scala|borderStyle=solid}
def sendResponse(response: RequestChannel.Response) {
    if (isTraceEnabled) {
      val requestHeader = response.request.header
      trace(s"Sending ${requestHeader.apiKey} response to client ${requestHeader.clientId} of " + s"${response.responseSend.size} bytes.")
    }
{code}

`responseSend` is of `scala.Option` type so it should be `response.responseSend.get.size`. 

  was:
In RequestChannel.scala, RequestChannel.sendResponse records incorrect size for `NetworkSend` when trace logging is enabled, as shown below:

{code:title=RequestChannel.scala|borderStyle=solid}
def sendResponse(response: RequestChannel.Response) {
    if (isTraceEnabled) {
      val requestHeader = response.request.header
      trace(s"Sending ${requestHeader.apiKey} response to client ${requestHeader.clientId} of " + s"${response.responseSend.size} bytes.")
    }
{code}

`responseSend` is of `scala.Option` type so it should be `response.responseSend.get.size`. 

No need to check if they are none here.


> RequestChannel.sendReponse records incorrect size for NetworkSend with TRACE logging
> ------------------------------------------------------------------------------------
>
>                 Key: KAFKA-5976
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5976
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 0.11.0.1
>            Reporter: huxihx
>            Assignee: huxihx
>
> In RequestChannel.scala, RequestChannel.sendResponse records incorrect size for `NetworkSend` when trace logging is enabled, as shown below:
> {code:title=RequestChannel.scala|borderStyle=solid}
> def sendResponse(response: RequestChannel.Response) {
>     if (isTraceEnabled) {
>       val requestHeader = response.request.header
>       trace(s"Sending ${requestHeader.apiKey} response to client ${requestHeader.clientId} of " + s"${response.responseSend.size} bytes.")
>     }
> {code}
> `responseSend` is of `scala.Option` type so it should be `response.responseSend.get.size`. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)