[
https://issues.apache.org/jira/browse/ZOOKEEPER-17?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12635964#action_12635964
]
Austin Shoemaker commented on ZOOKEEPER-17:
-------------------------------------------
The documentation states that if the client_id given to zookeeper_init is
expired or invalid that a new session will be automatically generated, implying
that it will proceed to the CONNECTED state.
In the implementation an expired or invalid client_id leads to the
unrecoverable SESSION_EXPIRED_STATE, which requires closing and reopening a new
connection with no client_id specified to continue.
Since the server has already assigned a replacement client_id it seems logical
to follow the header documentation and proceed with the new value, which
appears to be possible by removing the if-block that triggers the expired state
in check_events (zookeeper.c).
If the client application needs to know if the session was replaced, it can
simply compare the client_id it provided with the client_id upon entering
CONNECTED_STATE.
What do you think?
> zookeeper_init doc needs clarification
> --------------------------------------
>
> Key: ZOOKEEPER-17
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-17
> Project: Zookeeper
> Issue Type: Bug
> Components: c client, documentation
> Reporter: Patrick Hunt
> Assignee: Patrick Hunt
> Fix For: 3.0.0
>
> Attachments: ZOOKEEPER-17.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1967467&group_id=209147&atid=1008544
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.