hadoop-zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ph...@apache.org
Subject svn commit: r799703 - in /hadoop/zookeeper/branches/branch-3.2: ./ src/java/main/org/apache/zookeeper/common/ src/java/test/org/apache/zookeeper/test/
Date Fri, 31 Jul 2009 19:08:20 GMT
Author: phunt
Date: Fri Jul 31 19:08:19 2009
New Revision: 799703

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

Modified:
    hadoop/zookeeper/branches/branch-3.2/CHANGES.txt
    hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/common/PathTrie.java
    hadoop/zookeeper/branches/branch-3.2/src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java
    hadoop/zookeeper/branches/branch-3.2/src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java

Modified: hadoop/zookeeper/branches/branch-3.2/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/CHANGES.txt?rev=799703&r1=799702&r2=799703&view=diff
==============================================================================
--- hadoop/zookeeper/branches/branch-3.2/CHANGES.txt (original)
+++ hadoop/zookeeper/branches/branch-3.2/CHANGES.txt Fri Jul 31 19:08:19 2009
@@ -11,13 +11,15 @@
 
   ZOOKEEPER-470. include unistd.h for sleep() in c tests (chris via mahadev)
 
-  ZOOKEEPER-460. bad testRetry in cppunit tests (hudson failure) (giri via
-mahadev)
+  ZOOKEEPER-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:
 

Modified: hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/common/PathTrie.java
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/common/PathTrie.java?rev=799703&r1=799702&r2=799703&view=diff
==============================================================================
--- hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/common/PathTrie.java
(original)
+++ hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/common/PathTrie.java
Fri Jul 31 19:08:19 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/branches/branch-3.2/src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java?rev=799703&r1=799702&r2=799703&view=diff
==============================================================================
--- hadoop/zookeeper/branches/branch-3.2/src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java
(original)
+++ hadoop/zookeeper/branches/branch-3.2/src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java
Fri Jul 31 19:08:19 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/branches/branch-3.2/src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java?rev=799703&r1=799702&r2=799703&view=diff
==============================================================================
--- hadoop/zookeeper/branches/branch-3.2/src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java
(original)
+++ hadoop/zookeeper/branches/branch-3.2/src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java
Fri Jul 31 19:08:19 2009
@@ -52,7 +52,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