You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "Boris Shkolnik (JIRA)" <ji...@apache.org> on 2017/06/21 23:17:00 UTC
[jira] [Updated] (SAMZA-1336) session expiration propagation
[ https://issues.apache.org/jira/browse/SAMZA-1336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Boris Shkolnik updated SAMZA-1336:
----------------------------------
Description:
If ZK doesn't receive any communication from a zkClient (including heartbeats) for a session timeout period, it closes the session with the client. It removes all the ephemeral nodes associated with the client. That's why we need to restore all these nodes - need to re-register.
We are using ZkClient library to connect to zookeeper. This library allows us to get notification when the session is closed and when a new session is created. So when the new session is created we reset all session related state and re-register.
One weird feature of the library/zookeeper is that when a new session is established, it is still possible to receive old notifications. To avoid this we introduce generation number which we pass into each callback. And if the generation number has changed when the callback was invoked, we will ignore this callback.
was:When Zk session expires, it looses connection to the server. The server will expire all the ephemeral nodes for this client. As the result we need to re-register with the ZK.
> session expiration propagation
> -------------------------------
>
> Key: SAMZA-1336
> URL: https://issues.apache.org/jira/browse/SAMZA-1336
> Project: Samza
> Issue Type: Sub-task
> Reporter: Boris Shkolnik
> Assignee: Boris Shkolnik
> Fix For: 0.13.0
>
>
> If ZK doesn't receive any communication from a zkClient (including heartbeats) for a session timeout period, it closes the session with the client. It removes all the ephemeral nodes associated with the client. That's why we need to restore all these nodes - need to re-register.
> We are using ZkClient library to connect to zookeeper. This library allows us to get notification when the session is closed and when a new session is created. So when the new session is created we reset all session related state and re-register.
> One weird feature of the library/zookeeper is that when a new session is established, it is still possible to receive old notifications. To avoid this we introduce generation number which we pass into each callback. And if the generation number has changed when the callback was invoked, we will ignore this callback.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)