codelipenghui commented on issue #6259: Retry when zookeeper session expired at broker side. URL: https://github.com/apache/pulsar/issues/6259#issuecomment-585646444 When the session timeout happens on the local Zookeeper, all of the EPHEMERAL znode maintained by this broker will delete automatically. We need some mechanism to avoid the unnecessary ownership transfer of the bundles. Since the broker cached the owned bundles in memory, the broker can use the cache to re-own the bundles. Firstly, the broker should check if the znode exists for the bundle and the bundle owner is this broker. If the znode exists and the owner is this broker, it may be that the znode has not been deleted. The broker should check if the ephemeral owner is the current session ID. If not, the broker should wait for the znode deletion. Then the broker tries to own the bundle. If the broker owns the bundle success means the bundle is not owned by other brokers, the broker should check whether to preload the topics under the bundle. If the broker failed to own the bundle means the bundle owned by another broker. The broker should unload the bundle. @merlimat Please help check if the processing idea about the ownership is correct, I checked other places using the local zookeeper, It should be easy to handle.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
