Skip to content

Adding default retry configuration changes for cluster clients #3622

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

Merged

Conversation

petyaslavova
Copy link
Collaborator

@petyaslavova petyaslavova commented Apr 28, 2025

Pull Request check-list

  • Do tests and lints pass with this change?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?
  • Was the change added to CHANGES file?

Description of change

Adding default retry configuration changes for sync and async cluster clients

More details about the added changes:

  • Starting from this PR the cluster init argument (for both sync and async clients) 'cluster_error_retry_attempts' is deprecated
    • In case a retry object is provided, its number of retries will be used
    • If retry object is not provided a default one is created with ExponentialWithJitterBackoff strategy and number of retries synced with 'cluster_error_retry_attempts'
  • The connections to each cluster node will now have a default retry strategy configured that will not be configurable through the cluster initialization arguments - those connections won't have retries enabled. The only allowed error handling on lower connection level will be on ConnectionError - disconnect on the socket will be called.
  • (async) For Async Cluster Client the argument 'connection_error_retry_attempts' is completely removed - it wasn't used

@petyaslavova petyaslavova added breakingchange API or Breaking Change deprecation labels Apr 28, 2025
@petyaslavova petyaslavova force-pushed the ps_change_default_retry_config_for_cluster_clients branch from cd6b09a to d5b4eb9 Compare April 29, 2025 15:28
@petyaslavova petyaslavova force-pushed the ps_change_default_retry_config_for_cluster_clients branch from d5b4eb9 to c00ac73 Compare April 29, 2025 16:34
@petyaslavova petyaslavova merged commit 8faac60 into master Apr 30, 2025
37 checks passed
@petyaslavova petyaslavova deleted the ps_change_default_retry_config_for_cluster_clients branch April 30, 2025 14:03
petyaslavova added a commit that referenced this pull request Apr 30, 2025
* Adding default retry configuration changes for sync cluster client

* Adding default retry configuration changes for sync cluster client

* Adding default retry configuration changes for async cluster client

* Updating docs related to retries and read_from_replicas.

* Applying review comments.

* Removing retry checks when using set_retry for cluster clients.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breakingchange API or Breaking Change deprecation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants