You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Patrick Hunt (JIRA)" <ji...@apache.org> on 2016/06/01 21:35:59 UTC

[jira] [Commented] (ZOOKEEPER-1485) client xid overflow is not handled

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

Patrick Hunt commented on ZOOKEEPER-1485:
-----------------------------------------

> Does session expiration force you to construct a new ZooKeeper object

I wouldn't say "force". What happens is that once the client ZooKeeper object learns that it's session is expired it will go into the closed state - it's no longer usable at that point. The client would be forced to create a new session (new ZK object) in order to communicate with the service. This is the same as if the client is partitioned from the service for a period of time, when it comes back, if sufficient time has passed (> session timeout) then the session will be expired and the same logic would be executed by the client.

> client xid overflow is not handled
> ----------------------------------
>
>                 Key: ZOOKEEPER-1485
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1485
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: c client, java client
>    Affects Versions: 3.4.3, 3.3.5
>            Reporter: Michi Mutsuzaki
>            Assignee: Bruce Gao
>
> Both Java and C clients use signed 32-bit int as XIDs. XIDs are assumed to be non-negative, and zookeeper uses some negative values as special XIDs (e.g. -2 for ping, -4 for auth). However, neither Java nor C client ensures the XIDs it generates are non-negative, and the server doesn't reject negative XIDs.
> Pat had some suggestions on how to fix this:
> - (bin-compat) Expire the session when the client sends a negative XID.
> - (bin-incompat) In addition to expiring the session, use 64-bit int for XID so that overflow will practically never happen.
> --Michi



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)