hadoop-zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ph...@apache.org
Subject svn commit: r799702 - in /hadoop/zookeeper/trunk: CHANGES.txt src/java/main/org/apache/zookeeper/common/PathTrie.java src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java
Date Fri, 31 Jul 2009 19:08:00 GMT
Author: phunt
Date: Fri Jul 31 19:07:59 2009
New Revision: 799702

URL: http://svn.apache.org/viewvc?rev=799702&view=rev
Log:
ZOOKEEPER-487. setdata on root (/) crashes the servers

Modified:
    hadoop/zookeeper/trunk/CHANGES.txt
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/common/PathTrie.java
    hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java
    hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=799702&r1=799701&r2=799702&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Fri Jul 31 19:07:59 2009
@@ -7,24 +7,26 @@
 Backward compatible changes:
 
 BUGFIXES: 
-  ZOOKEEPER-469. make sure CPPUNIT_CFLAGS isn't overwritten (chris via
-mahadev)
+  ZOOKEEPER-469. make sure CPPUNIT_CFLAGS isn't overwritten
+  (chris via mahadev)
 
   ZOOKEEPER-471. update zkperl for 3.2.x branch (chris via mahadev)
 
   ZOOKEEPER-470. include unistd.h for sleep() in c tests (chris via mahadev)
 
-  ZOOKEEPR-460. bad testRetry in cppunit tests (hudson failure) (giri via
-mahadev)
+  ZOOKEEPR-460. bad testRetry in cppunit tests (hudson failure)
+  (giri via mahadev)
 
   ZOOKEEPER-467.  Change log level in BookieHandle. (flavio via mahadev)
 
   ZOOKEEPER-482. ignore sigpipe in testRetry to avoid silent immediate
-failure. (chris via mahadev)
+  failure. (chris via mahadev)
+
+  ZOOKEEPER-487. setdata on root (/) crashes the servers (mahadev via phunt)
 
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to
-"socket reuse" and failure to close client (phunt via mahadev)
+  "socket reuse" and failure to close client (phunt via mahadev)
  
   ZOOKEEPER-488. Fix zkServer.sh to add clover.jar in classpath
   (Giridharan Kesavan via gkesavan)  

Modified: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/common/PathTrie.java
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/common/PathTrie.java?rev=799702&r1=799701&r2=799702&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/common/PathTrie.java (original)
+++ hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/common/PathTrie.java Fri Jul
31 19:07:59 2009
@@ -248,6 +248,9 @@
         if (path == null) {
             return null;
         }
+        if ("/".equals(path)) {
+            return path;
+        }
         String[] pathComponents = path.split("/");
         TrieNode parent = rootNode;
         List<String> components = new ArrayList<String>();

Modified: hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java?rev=799702&r1=799701&r2=799702&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java (original)
+++ hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java Fri
Jul 31 19:07:59 2009
@@ -49,6 +49,7 @@
 
     public void testQuotaWithQuorum() throws Exception {
         ZooKeeper zk = createClient();
+        zk.setData("/", "some".getBytes(), -1);
         zk.create("/a", "some".getBytes(), Ids.OPEN_ACL_UNSAFE,
                 CreateMode.PERSISTENT);
         int i = 0;

Modified: hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java?rev=799702&r1=799701&r2=799702&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java
(original)
+++ hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java
Fri Jul 31 19:07:59 2009
@@ -53,7 +53,8 @@
         InterruptedException, KeeperException {
         final ZooKeeper zk = createClient();
         final String path = "/a/b/v";
-
+        // making sure setdata works on /
+        zk.setData("/", "some".getBytes(), -1);
         zk.create("/a", "some".getBytes(), Ids.OPEN_ACL_UNSAFE,
                 CreateMode.PERSISTENT);
 



Mime
View raw message