zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iv...@apache.org
Subject svn commit: r1417046 - in /zookeeper/bookkeeper/trunk: ./ hedwig-client/src/main/java/org/apache/hedwig/client/netty/impl/multiplex/ hedwig-client/src/main/java/org/apache/hedwig/client/netty/impl/simple/
Date Tue, 04 Dec 2012 17:27:36 GMT
Author: ivank
Date: Tue Dec  4 17:27:35 2012
New Revision: 1417046

URL: http://svn.apache.org/viewvc?rev=1417046&view=rev
Log:
BOOKKEEPER-470: Possible infinite loop in simple.SubscribeReconnectCallback (sijie via ivank)

Modified:
    zookeeper/bookkeeper/trunk/CHANGES.txt
    zookeeper/bookkeeper/trunk/hedwig-client/src/main/java/org/apache/hedwig/client/netty/impl/multiplex/ResubscribeCallback.java
    zookeeper/bookkeeper/trunk/hedwig-client/src/main/java/org/apache/hedwig/client/netty/impl/simple/SubscribeReconnectCallback.java

Modified: zookeeper/bookkeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/bookkeeper/trunk/CHANGES.txt?rev=1417046&r1=1417045&r2=1417046&view=diff
==============================================================================
--- zookeeper/bookkeeper/trunk/CHANGES.txt (original)
+++ zookeeper/bookkeeper/trunk/CHANGES.txt Tue Dec  4 17:27:35 2012
@@ -146,6 +146,8 @@ Trunk (unreleased changes)
 
         BOOKKEEPER-454: hedwig c++ tester script assumes sh is bash (ivank)
 
+        BOOKKEEPER-470: Possible infinite loop in simple.SubscribeReconnectCallback (sijie
via ivank)
+
       hedwig-server:
 
         BOOKKEEPER-302: No more messages delivered when hub server scans messages over two
ledgers. (sijie via ivank)

Modified: zookeeper/bookkeeper/trunk/hedwig-client/src/main/java/org/apache/hedwig/client/netty/impl/multiplex/ResubscribeCallback.java
URL: http://svn.apache.org/viewvc/zookeeper/bookkeeper/trunk/hedwig-client/src/main/java/org/apache/hedwig/client/netty/impl/multiplex/ResubscribeCallback.java?rev=1417046&r1=1417045&r2=1417046&view=diff
==============================================================================
--- zookeeper/bookkeeper/trunk/hedwig-client/src/main/java/org/apache/hedwig/client/netty/impl/multiplex/ResubscribeCallback.java
(original)
+++ zookeeper/bookkeeper/trunk/hedwig-client/src/main/java/org/apache/hedwig/client/netty/impl/multiplex/ResubscribeCallback.java
Tue Dec  4 17:27:35 2012
@@ -82,7 +82,11 @@ class ResubscribeCallback implements Cal
         // a topic subscription has failed. So instead, we'll just keep
         // retrying in the background until success.
         logger.error("Resubscribe failed with error: " + exception.getMessage());
-        retrySubscribeRequest();
+        // we don't retry subscribe request is channel manager is closing
+        // otherwise it might overflow the stack.
+        if (!channelManager.isClosed()) {
+            retrySubscribeRequest();
+        }
     }
 
     private void retrySubscribeRequest() {

Modified: zookeeper/bookkeeper/trunk/hedwig-client/src/main/java/org/apache/hedwig/client/netty/impl/simple/SubscribeReconnectCallback.java
URL: http://svn.apache.org/viewvc/zookeeper/bookkeeper/trunk/hedwig-client/src/main/java/org/apache/hedwig/client/netty/impl/simple/SubscribeReconnectCallback.java?rev=1417046&r1=1417045&r2=1417046&view=diff
==============================================================================
--- zookeeper/bookkeeper/trunk/hedwig-client/src/main/java/org/apache/hedwig/client/netty/impl/simple/SubscribeReconnectCallback.java
(original)
+++ zookeeper/bookkeeper/trunk/hedwig-client/src/main/java/org/apache/hedwig/client/netty/impl/simple/SubscribeReconnectCallback.java
Tue Dec  4 17:27:35 2012
@@ -84,7 +84,11 @@ class SubscribeReconnectCallback impleme
         // a topic subscription has failed. So instead, we'll just keep
         // retrying in the background until success.
         logger.error("Subscribe reconnect failed with error: ", exception);
-        retrySubscribeRequest();
+        // we don't retry subscribe request is channel manager is closing
+        // otherwise it might overflow the stack.
+        if (!channelManager.isClosed()) {
+            retrySubscribeRequest();
+        }
     }
 
     private void retrySubscribeRequest() {



Mime
View raw message