[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-3570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16978983#comment-16978983
 ] 

Hudson commented on ZOOKEEPER-3570:
-----------------------------------

FAILURE: Integrated in Jenkins build ZooKeeper-trunk #787 (See 
[https://builds.apache.org/job/ZooKeeper-trunk/787/])
ZOOKEEPER-3570: make the special client xid constant (nixon: rev 
ae68c7d50e4057ef3f9b99ac0cd0200a8bd5f235)
* (edit) zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java
* (edit) 
zookeeper-server/src/main/java/org/apache/zookeeper/server/NIOServerCnxn.java
* (edit) 
zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/WatchLeakTest.java
* (edit) 
zookeeper-server/src/main/java/org/apache/zookeeper/server/NettyServerCnxn.java
* (edit) 
zookeeper-server/src/main/java/org/apache/zookeeper/server/FinalRequestProcessor.java


> make the special client xid constant
> ------------------------------------
>
>                 Key: ZOOKEEPER-3570
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3570
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: server
>    Affects Versions: 3.6.0
>            Reporter: maoling
>            Assignee: maoling
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 3.6.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> in the *ClientCnxn*, we had hard-code cxid which is not elegant.
> we need a constant for cxid
> {code:java}
> if (replyHdr.getXid() == -2) {
>     // -2 is the xid for pings
>     if (LOG.isDebugEnabled()) {
>         LOG.debug("Got ping response for sessionid: 0x"
>                   + Long.toHexString(sessionId)
>                   + " after "
>                   + ((System.nanoTime() - lastPingSentNs) / 1000000)
>                   + "ms");
>     }
>     return;
> }
> if (replyHdr.getXid() == -4) {
>     // -4 is the xid for AuthPacket
>     if (replyHdr.getErr() == KeeperException.Code.AUTHFAILED.intValue()) {
>         state = States.AUTH_FAILED;
>         eventThread.queueEvent(new WatchedEvent(Watcher.Event.EventType.None, 
> Watcher.Event.KeeperState.AuthFailed, null));
>         eventThread.queueEventOfDeath();
>     }
>     if (LOG.isDebugEnabled()) {
>         LOG.debug("Got auth sessionid:0x" + Long.toHexString(sessionId));
>     }
>     return;
> }
> if (replyHdr.getXid() == -1) {
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to