hadoop-zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r1004844 - in /hadoop/zookeeper/trunk: CHANGES.txt src/c/src/zookeeper.c
Date Tue, 05 Oct 2010 22:45:46 GMT
Author: mahadev
Date: Tue Oct  5 22:45:46 2010
New Revision: 1004844

URL: http://svn.apache.org/viewvc?rev=1004844&view=rev
Log:
ZOOKEEPER-804. c unit tests failing due to "assertion cptr failed" (michi mutsuzaki via mahadev)

Modified:
    hadoop/zookeeper/trunk/CHANGES.txt
    hadoop/zookeeper/trunk/src/c/src/zookeeper.c

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=1004844&r1=1004843&r2=1004844&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Tue Oct  5 22:45:46 2010
@@ -100,6 +100,9 @@ BUGFIXES: 
 
   ZOOKEEPER-846. zookeeper client doesn't shut down cleanly on the close call
   (phunt)
+  
+  ZOOKEEPER-804. c unit tests failing due to "assertion cptr failed" (michi
+  mutsuzaki via mahadev)
 
 IMPROVEMENTS:
   ZOOKEEPER-724. Improve junit test integration - log harness information 

Modified: hadoop/zookeeper/trunk/src/c/src/zookeeper.c
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/src/zookeeper.c?rev=1004844&r1=1004843&r2=1004844&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/c/src/zookeeper.c (original)
+++ hadoop/zookeeper/trunk/src/c/src/zookeeper.c Tue Oct  5 22:45:46 2010
@@ -1949,6 +1949,15 @@ int zookeeper_process(zhandle_t *zh, int
             int rc = hdr.err;
             /* Find the request corresponding to the response */
             completion_list_t *cptr = dequeue_completion(&zh->sent_requests);
+
+            /* [ZOOKEEPER-804] Don't assert if zookeeper_close has been called. */
+            if (zh->close_requested == 1) {
+                if (cptr) {
+                    destroy_completion_entry(cptr);
+                    cptr = NULL;
+                }
+                return ZINVALIDSTATE;
+            }
             assert(cptr);
             /* The requests are going to come back in order */
             if (cptr->xid != hdr.xid) {



Mime
View raw message