hadoop-zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r919706 - in /hadoop/zookeeper/trunk: CHANGES.txt src/c/src/zookeeper.c
Date Sat, 06 Mar 2010 05:33:29 GMT
Author: mahadev
Date: Sat Mar  6 05:33:29 2010
New Revision: 919706

URL: http://svn.apache.org/viewvc?rev=919706&view=rev
Log:
ZOOKEEPER-622. Test for pending watches in send_set_watches should be moved (ben and steven
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=919706&r1=919705&r2=919706&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Sat Mar  6 05:33:29 2010
@@ -243,6 +243,9 @@
   ZOOKEEPER-687. LENonterminatetest fails on some machines. (mahadev)
 
   ZOOKEEPER-681. Minor doc issue re unset maxClientCnxns (phunt via mahadev)
+
+  ZOOKEEPER-622. Test for pending watches in send_set_watches should be moved
+  (ben and steven via mahadev)
  
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to

Modified: hadoop/zookeeper/trunk/src/c/src/zookeeper.c
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/src/zookeeper.c?rev=919706&r1=919705&r2=919706&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/c/src/zookeeper.c (original)
+++ hadoop/zookeeper/trunk/src/c/src/zookeeper.c Sat Mar  6 05:33:29 2010
@@ -1189,17 +1189,22 @@
     struct SetWatches req;
     int rc;
 
+    req.relativeZxid = zh->last_zxid;
+    req.dataWatches.data = collect_keys(zh->active_node_watchers, &req.dataWatches.count);
+    req.existWatches.data = collect_keys(zh->active_exist_watchers, &req.existWatches.count);
+    req.childWatches.data = collect_keys(zh->active_child_watchers, &req.childWatches.count);
+
     // return if there are no pending watches
     if (!req.dataWatches.count && !req.existWatches.count &&
         !req.childWatches.count) {
+        free_key_list(req.dataWatches.data, req.dataWatches.count);
+        free_key_list(req.existWatches.data, req.existWatches.count);
+        free_key_list(req.childWatches.data, req.childWatches.count);
         return ZOK;
     }
 
+
     oa = create_buffer_oarchive();
-    req.relativeZxid = zh->last_zxid;
-    req.dataWatches.data = collect_keys(zh->active_node_watchers, &req.dataWatches.count);
-    req.existWatches.data = collect_keys(zh->active_exist_watchers, &req.existWatches.count);
-    req.childWatches.data = collect_keys(zh->active_child_watchers, &req.childWatches.count);
     rc = serialize_RequestHeader(oa, "header", &h);
     rc = rc < 0 ? rc : serialize_SetWatches(oa, "req", &req);
     /* add this buffer to the head of the send queue */



Mime
View raw message