[jira] [Comment Edited] (KAFKA-1577) Exception in ConnectionQuotas while shutting down
[ https://issues.apache.org/jira/browse/KAFKA-1577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14116441#comment-14116441 ] Bogdan Calmac edited comment on KAFKA-1577 at 8/30/14 4:03 PM: --- Aside from swallowing the exception at top level, wouldn't it be good to also fix {{ConnectionQuotas.dec()}} and check for {{isDefined()}} before decrementing the counter? As an undesired side-effect of allowing the NoSuchElementException in the first place, the close() methods after dec() in the code below would not get called. {code} def close(channel: SocketChannel) { if(channel != null) { debug("Closing connection from " + channel.socket.getRemoteSocketAddress()) connectionQuotas.dec(channel.socket.getInetAddress) swallowError(channel.socket().close()) swallowError(channel.close()) } } {code} See https://reviews.apache.org/r/25213/ and the patch [^KAFKA-1577_check_counter_before_decrementing.patch]. was (Author: bcalmac): Aside from swallowing the exception at top level, wouldn't it be good to also fix {{ConnectionQuotas.dec()}} and check for {{isDefined()}} before decrementing the counter? As an undesired side-effect of allowing the NoSuchElementException in the first place, the close() methods after dec() in the code below would not get called. {code} def close(channel: SocketChannel) { if(channel != null) { debug("Closing connection from " + channel.socket.getRemoteSocketAddress()) connectionQuotas.dec(channel.socket.getInetAddress) swallowError(channel.socket().close()) swallowError(channel.close()) } } {code} See https://reviews.apache.org/r/25213/ and the attached patch. > Exception in ConnectionQuotas while shutting down > - > > Key: KAFKA-1577 > URL: https://issues.apache.org/jira/browse/KAFKA-1577 > Project: Kafka > Issue Type: Bug > Components: core >Reporter: Joel Koshy >Assignee: Sriharsha Chintalapani > Labels: newbie > Attachments: KAFKA-1577.patch, KAFKA-1577_2014-08-20_19:57:44.patch, > KAFKA-1577_2014-08-26_07:33:13.patch, > KAFKA-1577_check_counter_before_decrementing.patch > > > {code} > [2014-08-07 19:38:08,228] ERROR Uncaught exception in thread > 'kafka-network-thread-9092-0': (kafka.utils.Utils$) > java.util.NoSuchElementException: None.get > at scala.None$.get(Option.scala:185) > at scala.None$.get(Option.scala:183) > at kafka.network.ConnectionQuotas.dec(SocketServer.scala:471) > at kafka.network.AbstractServerThread.close(SocketServer.scala:158) > at kafka.network.AbstractServerThread.close(SocketServer.scala:150) > at kafka.network.AbstractServerThread.closeAll(SocketServer.scala:171) > at kafka.network.Processor.run(SocketServer.scala:338) > at java.lang.Thread.run(Thread.java:662) > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Comment Edited] (KAFKA-1577) Exception in ConnectionQuotas while shutting down
[ https://issues.apache.org/jira/browse/KAFKA-1577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14272165#comment-14272165 ] German Borbolla edited comment on KAFKA-1577 at 1/10/15 12:56 AM: -- This is marked as Fix version for 0.8.2 however I just encountered the same issue using the latest source from the 0.8.2 branch. Perhaps it was only committed to trunk? Is there any chance this will be included in 0.8.2? Here's the stack trace: {noformat} [2015-01-09 15:53:12,486] ERROR Uncaught exception in thread 'kafka-network-thread-9092-4': (kafka.utils.Utils$) java.util.NoSuchElementException: None.get at scala.None$.get(Option.scala:322) at scala.None$.get(Option.scala:320) at kafka.network.ConnectionQuotas.dec(SocketServer.scala:524) at kafka.network.AbstractServerThread.close(SocketServer.scala:165) at kafka.network.AbstractServerThread.close(SocketServer.scala:157) at kafka.network.Processor.close(SocketServer.scala:374) at kafka.network.AbstractServerThread.closeAll(SocketServer.scala:180) at kafka.network.Processor.run(SocketServer.scala:364) at java.lang.Thread.run(Thread.java:745) {noformat} Thanks was (Author: german.borbolla): This is marked as Fix version for 0.8.2 however I just encountered the same issue using the latest source from the 0.8.2 branch. Perhaps it was only committed to trunk? Is there any chance this will be included in 0.8.2? Thanks > Exception in ConnectionQuotas while shutting down > - > > Key: KAFKA-1577 > URL: https://issues.apache.org/jira/browse/KAFKA-1577 > Project: Kafka > Issue Type: Bug > Components: core >Affects Versions: 0.8.2 >Reporter: Joel Koshy >Assignee: Sriharsha Chintalapani >Priority: Blocker > Labels: newbie > Fix For: 0.8.2 > > Attachments: KAFKA-1577.patch, KAFKA-1577.patch, > KAFKA-1577_2014-08-20_19:57:44.patch, KAFKA-1577_2014-08-26_07:33:13.patch, > KAFKA-1577_2014-09-26_19:13:05.patch, > KAFKA-1577_check_counter_before_decrementing.patch > > > {code} > [2014-08-07 19:38:08,228] ERROR Uncaught exception in thread > 'kafka-network-thread-9092-0': (kafka.utils.Utils$) > java.util.NoSuchElementException: None.get > at scala.None$.get(Option.scala:185) > at scala.None$.get(Option.scala:183) > at kafka.network.ConnectionQuotas.dec(SocketServer.scala:471) > at kafka.network.AbstractServerThread.close(SocketServer.scala:158) > at kafka.network.AbstractServerThread.close(SocketServer.scala:150) > at kafka.network.AbstractServerThread.closeAll(SocketServer.scala:171) > at kafka.network.Processor.run(SocketServer.scala:338) > at java.lang.Thread.run(Thread.java:662) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)