kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jjko...@apache.org
Subject git commit: KAFKA-1577; Follow-up patch: Fix exception in connection-quotas while shutting down by forcing key-cancellation; reviewed by Joel Koshy and Neha Narkhede
Date Tue, 30 Sep 2014 01:23:02 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 6861d4688 -> 54b6419bb


KAFKA-1577; Follow-up patch: Fix exception in connection-quotas while shutting down by forcing
key-cancellation; reviewed by Joel Koshy and Neha Narkhede


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/54b6419b
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/54b6419b
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/54b6419b

Branch: refs/heads/trunk
Commit: 54b6419bb37ed88c8b77aee3c0c23aeb9b5be419
Parents: 6861d46
Author: Sriharsha Chintalapani <schintalapani@hortonworks.com>
Authored: Mon Sep 29 18:20:54 2014 -0700
Committer: Joel Koshy <jjkoshy@gmail.com>
Committed: Mon Sep 29 18:21:07 2014 -0700

----------------------------------------------------------------------
 core/src/main/scala/kafka/network/SocketServer.scala | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/54b6419b/core/src/main/scala/kafka/network/SocketServer.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/network/SocketServer.scala b/core/src/main/scala/kafka/network/SocketServer.scala
index 3a6f8d1..cee76b3 100644
--- a/core/src/main/scala/kafka/network/SocketServer.scala
+++ b/core/src/main/scala/kafka/network/SocketServer.scala
@@ -172,6 +172,8 @@ private[kafka] abstract class AbstractServerThread(connectionQuotas: ConnectionQ
    * Close all open connections
    */
   def closeAll() {
+    // removes cancelled keys from selector.keys set
+    this.selector.selectNow() 
     val iter = this.selector.keys().iterator()
     while (iter.hasNext) {
       val key = iter.next()
@@ -359,7 +361,7 @@ private[kafka] class Processor(val id: Int,
       maybeCloseOldestConnection
     }
     debug("Closing selector.")
-    swallowError(closeAll())
+    closeAll()
     swallowError(selector.close())
     shutdownComplete()
   }


Mime
View raw message