zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mic...@apache.org
Subject svn commit: r1550902 - in /zookeeper/branches/branch-3.4: CHANGES.txt ivy.xml src/java/main/org/apache/zookeeper/server/NettyServerCnxn.java
Date Sat, 14 Dec 2013 08:36:46 GMT
Author: michim
Date: Sat Dec 14 08:36:46 2013
New Revision: 1550902

URL: http://svn.apache.org/r1550902
Log:
ZOOKEEPER-1715. Upgrade netty version (Sean Bridges via michim)

Modified:
    zookeeper/branches/branch-3.4/CHANGES.txt
    zookeeper/branches/branch-3.4/ivy.xml
    zookeeper/branches/branch-3.4/src/java/main/org/apache/zookeeper/server/NettyServerCnxn.java

Modified: zookeeper/branches/branch-3.4/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/CHANGES.txt?rev=1550902&r1=1550901&r2=1550902&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/CHANGES.txt (original)
+++ zookeeper/branches/branch-3.4/CHANGES.txt Sat Dec 14 08:36:46 2013
@@ -219,6 +219,8 @@ IMPROVEMENTS:
   ZOOKEEPER-1786. ZooKeeper data model documentation is incorrect
   (Niraj Tolia via fpj)
 
+  ZOOKEEPER-1715. Upgrade netty version (Sean Bridges via michim)
+
 Release 3.4.5 - 2012-09-30
 
 Backward compatible changes:

Modified: zookeeper/branches/branch-3.4/ivy.xml
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/ivy.xml?rev=1550902&r1=1550901&r2=1550902&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/ivy.xml (original)
+++ zookeeper/branches/branch-3.4/ivy.xml Sat Dec 14 08:36:46 2013
@@ -46,7 +46,7 @@
     <dependency org="log4j" name="log4j" rev="1.2.16" transitive="false" conf="default"/>
     <dependency org="jline" name="jline" rev="0.9.94" transitive="false" conf="default"/>
 
-    <dependency org="org.jboss.netty" name="netty" conf="default" rev="3.2.2.Final">
+    <dependency org="io.netty" name="netty" conf="default" rev="3.7.0.Final">
       <artifact name="netty" type="jar" conf="default"/>
     </dependency>
 

Modified: zookeeper/branches/branch-3.4/src/java/main/org/apache/zookeeper/server/NettyServerCnxn.java
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/src/java/main/org/apache/zookeeper/server/NettyServerCnxn.java?rev=1550902&r1=1550901&r2=1550902&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/src/java/main/org/apache/zookeeper/server/NettyServerCnxn.java
(original)
+++ zookeeper/branches/branch-3.4/src/java/main/org/apache/zookeeper/server/NettyServerCnxn.java
Sat Dec 14 08:36:46 2013
@@ -155,9 +155,13 @@ public class NettyServerCnxn extends Ser
         ResumeMessageEvent(Channel channel) {
             this.channel = channel;
         }
+        @Override
         public Object getMessage() {return null;}
+        @Override
         public SocketAddress getRemoteAddress() {return null;}
+        @Override
         public Channel getChannel() {return channel;}
+        @Override
         public ChannelFuture getFuture() {return null;}
     };
     
@@ -739,7 +743,7 @@ public class NettyServerCnxn extends Ser
                             zks.processPacket(this, bb);
 
                             if (zks.shouldThrottle(outstandingCount.incrementAndGet())) {
-                                disableRecv();
+                                disableRecvNoWait();
                             }
                         } else {
                             LOG.debug("got conn req request from "
@@ -803,13 +807,17 @@ public class NettyServerCnxn extends Ser
 
     @Override
     public void disableRecv() {
+        disableRecvNoWait().awaitUninterruptibly();
+    }
+    
+    private ChannelFuture disableRecvNoWait() {
         throttled = true;
         if (LOG.isDebugEnabled()) {
             LOG.debug("Throttling - disabling recv " + this);
         }
-        channel.setReadable(false).awaitUninterruptibly();
+        return channel.setReadable(false);
     }
-
+    
     @Override
     public long getOutstandingRequests() {
         return outstandingCount.longValue();
@@ -832,6 +840,7 @@ public class NettyServerCnxn extends Ser
 
     /** Send close connection packet to the client.
      */
+    @Override
     public void sendCloseSession() {
         sendBuffer(ServerCnxnFactory.closeConn);
     }



Mime
View raw message