You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by br...@apache.org on 2011/08/24 00:34:58 UTC

svn commit: r1160913 - in /zookeeper/bookkeeper/trunk: CHANGES.txt hedwig-server/src/main/java/org/apache/hedwig/server/subscriptions/AbstractSubscriptionManager.java

Author: breed
Date: Tue Aug 23 22:34:58 2011
New Revision: 1160913

URL: http://svn.apache.org/viewvc?rev=1160913&view=rev
Log:
BOOKKEEPER-43: NullPointException when releasing topic

Modified:
    zookeeper/bookkeeper/trunk/CHANGES.txt
    zookeeper/bookkeeper/trunk/hedwig-server/src/main/java/org/apache/hedwig/server/subscriptions/AbstractSubscriptionManager.java

Modified: zookeeper/bookkeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/bookkeeper/trunk/CHANGES.txt?rev=1160913&r1=1160912&r2=1160913&view=diff
==============================================================================
--- zookeeper/bookkeeper/trunk/CHANGES.txt (original)
+++ zookeeper/bookkeeper/trunk/CHANGES.txt Tue Aug 23 22:34:58 2011
@@ -30,3 +30,6 @@ BUGFIXES:
 
   BOOKKEEPER-29: BookieRecoveryTest fails intermittently (ivank, fpj via fpj)
 
+ hedwig-server/
+
+  BOOKKEEPER-43: NullPointException when releasing topic (Sijie Guo via breed)

Modified: zookeeper/bookkeeper/trunk/hedwig-server/src/main/java/org/apache/hedwig/server/subscriptions/AbstractSubscriptionManager.java
URL: http://svn.apache.org/viewvc/zookeeper/bookkeeper/trunk/hedwig-server/src/main/java/org/apache/hedwig/server/subscriptions/AbstractSubscriptionManager.java?rev=1160913&r1=1160912&r2=1160913&view=diff
==============================================================================
--- zookeeper/bookkeeper/trunk/hedwig-server/src/main/java/org/apache/hedwig/server/subscriptions/AbstractSubscriptionManager.java (original)
+++ zookeeper/bookkeeper/trunk/hedwig-server/src/main/java/org/apache/hedwig/server/subscriptions/AbstractSubscriptionManager.java Tue Aug 23 22:34:58 2011
@@ -217,8 +217,9 @@ public abstract class AbstractSubscripti
     @Override
     public void lostTopic(ByteString topic) {
         top2sub2seq.remove(topic);
+        AtomicInteger count = topic2LocalCounts.remove(topic);
         // Notify listeners if necessary.
-        if (topic2LocalCounts.remove(topic).get() > 0)
+        if (null != count && count.get() > 0)
             notifyUnsubcribe(topic);
     }