Browse Source

ZOOKEEPER-449. sesssionmoved in java code and ZCLOSING in C have the same value. (mahadev)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/zookeeper/trunk@788872 13f79535-47bb-0310-9956-ffa450edef68
Mahadev Konar 16 years ago
parent
commit
ed6a4639e7

+ 3 - 0
CHANGES.txt

@@ -136,6 +136,9 @@ connected (breed via mahadev)
   ZOOKEEPER-417. stray message problem when changing servers (breed via
 mahadev)
 
+  ZOOKEEPER-449. sesssionmoved in java code and ZCLOSING in C have the same
+value. (mahadev)
+
 IMPROVEMENTS:
   ZOOKEEPER-308. improve the atomic broadcast performance 3x.
   (breed via mahadev)

+ 2 - 1
src/c/include/zookeeper.h

@@ -106,7 +106,8 @@ enum ZOO_ERRORS {
   ZINVALIDACL = -114, /*!< Invalid ACL specified */
   ZAUTHFAILED = -115, /*!< Client authentication failed */
   ZCLOSING = -116, /*!< ZooKeeper is closing */
-  ZNOTHING = -117 /*!< (not error) no server responses to process */
+  ZNOTHING = -117, /*!< (not error) no server responses to process */
+  ZSESSIONMOVED = -118 /*!<session moved to another server, so operation is ignored */ 
 };
 
 #ifdef __cplusplus

+ 2 - 0
src/c/src/zookeeper.c

@@ -2638,6 +2638,8 @@ const char* zerror(int c)
       return "zookeeper is closing";
     case ZNOTHING:
       return "(not error) no server responses to process";
+    case ZSESSIONMOVED:
+      return "session moved to another server, so operation is ignored";
     }
     if (c > 0) {
       return strerror(c);

+ 2 - 2
src/java/main/org/apache/zookeeper/KeeperException.java

@@ -269,7 +269,7 @@ public abstract class KeeperException extends Exception {
         /**
          * This value will be used directly in {@link CODE#SESSIONMOVED}
          */
-        // public static final int SessionMoved = -116;
+        // public static final int SessionMoved = -118;
     }
 
     /** Codes which represent the various KeeperException
@@ -332,7 +332,7 @@ public abstract class KeeperException extends Exception {
         /** Client authentication failed */
         AUTHFAILED (AuthFailed),
         /** Session moved to another server, so operation is ignored */
-        SESSIONMOVED (-116);
+        SESSIONMOVED (-118);
 
         private static final Map<Integer,Code> lookup
             = new HashMap<Integer,Code>();