You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ns...@apache.org on 2011/10/11 04:17:22 UTC

svn commit: r1181533 - /hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java

Author: nspiegelberg
Date: Tue Oct 11 02:17:18 2011
New Revision: 1181533

URL: http://svn.apache.org/viewvc?rev=1181533&view=rev
Log:
Comparing the current data in a ZooKeeper node with what was attempted to be written instead of the JVM id in RecoverableZooKeeper

Summary:
A one-line fix for a bug in D242017, where the data read from a zk node was
compared to the JVM id instead of the data that was attempted to be written in
RecoverableZooKeeper.

Test Plan:
Run on a dev cluster with HBaseTest. Start two masters, restart one master,
make sure that exactly one master is active.

Reviewed By: liyintang
Reviewers: liyintang, kannan
CC: liyintang
Differential Revision: 242102

Modified:
    hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java

Modified: hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java?rev=1181533&r1=1181532&r2=1181533&view=diff
==============================================================================
--- hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java (original)
+++ hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java Tue Oct 11 02:17:18 2011
@@ -467,7 +467,7 @@ public class RecoverableZooKeeper {
               // so we read the node and compare.
               byte[] currentData = zk.getData(path, false, null);
               if (currentData != null &&
-                  Bytes.compareTo(currentData, id) == 0) {
+                  Bytes.compareTo(currentData, data) == 0) {
                 // We successfully created a non-sequential node
                 return path;
               }