@jonathansantilli : Thanks for the patch. About the approach. I am not exactly 
sure about the impact of explicitly deleting an ephemeral node whose session is 
about to expire. For example, I am not sure if the following can happen: (1) ZK 
session 1 expires and the ZK leader changes; (2) new ZK leader retains the 
ephemeral node from session 1 and is about to expire session 1; (3) ZK session 
2 deletes and recreates the ephemeral node; (4) ZK leader expires session 1 and 
deletes the ephemeral node created by session 2. If this can happen, it will 
create a weird problem in Kafka. 

An alternative approach is to retry the creation of the ephemeral node up to 
sth like twice the session timeout. It may take a bit long for the broker to be 
re-registered. However, it seems it's a bit safer and simpler, until 
ZOOKEEPER-2985 is fixed. 

[ Full content available at: https://github.com/apache/kafka/pull/5575 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to