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

RetryPolicy "wait before retry" support #1154

Open
Lorak-mmk opened this issue Dec 17, 2024 · 0 comments
Open

RetryPolicy "wait before retry" support #1154

Lorak-mmk opened this issue Dec 17, 2024 · 0 comments
Labels
API-breaking This might introduce incompatible API changes area/statement-execution enhancement New feature or request

Comments

@Lorak-mmk
Copy link
Collaborator

In some other drivers retry policies support waiting before retrying. We should discuss if we want this.
This can be implemented to implement e.g. expotential backoff retry policy, present in some other driver.

Java Driver 4 explicitly says that it does not have this capability, and waiting before retry should be implemented in user code: https://java-[driver.docs.scylladb.com/scylla-4.15.0.x/api/index.html](https://java-driver.docs.scylladb.com/scylla-4.15.0.x/api/com/datastax/oss/driver/api/core/retry/RetryPolicy.html)

Java Driver 3 also does not have such capability in its RetryDecision:
https://java-driver.docs.scylladb.com/scylla-3.11.2.x/api/com/datastax/driver/core/policies/RetryPolicy.html
https://java-driver.docs.scylladb.com/scylla-3.11.2.x/api/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html

GoCql has this policy: https://github.com/scylladb/gocql/blob/e12494df329053d63aa205ffd4d7082587ea72bd/policies.go#L174-L178

Python driver has this capability, but of course implemented in a weird way (because it is not possible to write good code in Python). RetryPolicy is documented to return 2-element tuple from its methods (first element is retry decision, second is consistency), but it can actually return 3 elements, where third is the time to wait before retry. scylladb/python-driver@f4eabdf

C++ driver does not have this capability.

The fact that Java Driver does not have this capability is a signal to me that perhaps there are some issues with it.
The one that comes to my mind is interacting badly with client-side timeout.

@Lorak-mmk Lorak-mmk added API-breaking This might introduce incompatible API changes area/statement-execution enhancement New feature or request labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API-breaking This might introduce incompatible API changes area/statement-execution enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant