Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/more reliable zookeeper #992

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pvbouwel
Copy link
Contributor

This change will just create 1 KazooClient and keeps it running in the background. The KazooClient itself has logic to recover connectivity.

In order to deal with intermittent failure we also retry operations if they fail due to connectivity related issues. At this time the once that came from test scenario's were kazoo.exceptions.SessionExpiredError and kazoo.exceptions.ConnectionLoss but if other retryable exceptions are identified they could be easily added.

Peter Van Bouwel added 3 commits January 10, 2025 15:51
Rather than opening and closing connections for each Zookeeper interaction use the functionality in the KazooClient which maintains a connection with Zookeeper.

This lowers resource consumption and improves latency.
KazooClient was mocked for some tests make sure this mocking is maintained with the new way of using KazooClient.
The IDE will get confused because the client will create methods at runtime. By referencing the KazooClient methods in the class the IDE can use hints based on the downstream methods.
@pvbouwel pvbouwel requested a review from jdries January 10, 2025 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant