Closed iconara closed 10 years ago
Cool idea. One context where it might be helpful to specify retries per request, with options passed to execute
or prepare
, is with counter updates. While most developers work to make their regular updates idempotent, there will likely always be some risk associated with having a client retry counter updates that have may already been applied on the server. And since you can't update counters and regular data with the same request, it could make sense to configure this behavior per request.
This exists in the new driver
Provide some kind of (optional) retry mechanism for operations. Many times you just want to try again on failures that are transient.
Operations should only be retried if the user has requested an operation to be automatically retried, and the error is known to be transient (e.g. unavailable, read/write timeout, overloaded).
The number of retries should be configurable on a per-client basis (possibly per-request, but do you really need that kind of granularity?).
Another feature that could be included is optional downgrading of consistency on unavailable errors.