Skip to content

HOTFIX: ClassCastException in request logging#2566

Closed
hachikuji wants to merge 1 commit intoapache:trunkfrom
hachikuji:hotfix-request-logging
Closed

HOTFIX: ClassCastException in request logging#2566
hachikuji wants to merge 1 commit intoapache:trunkfrom
hachikuji:hotfix-request-logging

Conversation

@hachikuji
Copy link
Copy Markdown
Contributor

No description provided.

@hachikuji hachikuji changed the title HOTFIX: ClassCastException in requrest logging HOTFIX: ClassCastException in request logging Feb 18, 2017
@hachikuji
Copy link
Copy Markdown
Contributor Author

hachikuji commented Feb 18, 2017

cc @cmccabe @ewencp @ijuma

When TRACE logging is enabled, we see this:

[2017-02-17 23:09:49,444] ERROR Processor got uncaught exception. (kafka.network.Processor)
java.lang.ClassCastException: Expected request with type class scala.runtime.Nothing$, but found class org.apache.kafka.common.requests.ApiVersionsRequest
    at kafka.network.RequestChannel$Request.body(RequestChannel.scala:118)
    at kafka.network.RequestChannel$Request.requestDesc(RequestChannel.scala:111)
    at kafka.network.RequestChannel$Request.updateRequestMetrics(RequestChannel.scala:169)
    at kafka.network.Processor$$anonfun$processCompletedSends$1.apply(SocketServer.scala:532)
    at kafka.network.Processor$$anonfun$processCompletedSends$1.apply(SocketServer.scala:528)
    at scala.collection.Iterator$class.foreach(Iterator.scala:893)
    at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
    at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
    at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
    at kafka.network.Processor.processCompletedSends(SocketServer.scala:528)
    at kafka.network.Processor.run(SocketServer.scala:434)
    at java.lang.Thread.run(Thread.java:745)

@cmccabe
Copy link
Copy Markdown
Contributor

cmccabe commented Feb 18, 2017

LGTM (non-binding)

@ewencp
Copy link
Copy Markdown
Contributor

ewencp commented Feb 18, 2017

LGTM, and I assume tests will pass since this wasn't being exercised. Not sure if it's worth adding a test specifically for this, though it seems like we might want to also turn on trace logging during tests or something like that since that's the only way to exercise all code paths like this.

@hachikuji
Copy link
Copy Markdown
Contributor Author

@ewencp Yeah, agreed. I'll add a JIRA to do that since I'm pretty sure this is not the first time we've had a bug which only affected logging.

@asfbot
Copy link
Copy Markdown

asfbot commented Feb 18, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.10/1746/
Test PASSed (JDK 7 and Scala 2.10).

@asfbot
Copy link
Copy Markdown

asfbot commented Feb 18, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/1746/
Test PASSed (JDK 8 and Scala 2.12).

@asfbot
Copy link
Copy Markdown

asfbot commented Feb 18, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.11/1749/
Test PASSed (JDK 8 and Scala 2.11).

@ijuma
Copy link
Copy Markdown
Member

ijuma commented Feb 18, 2017

@hachikuji, thanks for fixing this. I filed a JIRA for the logging thing a while back due to a similar incident.

@hachikuji
Copy link
Copy Markdown
Contributor Author

@ijuma No worries. I probably should have tried at least one of the sanity system tests prior to merging.

hachikuji added a commit to confluentinc/kafka that referenced this pull request Feb 23, 2017
Author: Jason Gustafson <jason@confluent.io>

Reviewers: Colin P. Mccabe <cmccabe@confluent.io>, Ewen Cheslack-Postava <me@ewencp.org>

Closes apache#2566 from hachikuji/hotfix-request-logging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants