If true, batch requests will be retried in case of connection errors.
⚠️ Warning: Retrying after a connection error may lead to duplicate executions, since the server might have already received and processed the request before the error occurred.
If true, failed commands with a retriable error (e.g., TRYAGAIN) will be automatically retried.
⚠️ Warning: Enabling this flag may cause commands targeting the same slot to execute out of order.
Defines a retry strategy for batch requests, allowing control over retries in case of server or connection errors.
This strategy determines whether failed commands should be retried, impacting execution order and potential side effects.
Behavior
retryServerErroristrue, failed commands with a retriable error (e.g.,TRYAGAIN) will be retried.retryConnectionErroristrue, batch requests will be retried on connection failures.Cautions
Example Scenario
Expected response when keys are empty:
However, if the slot is migrating, both commands may return an
ASKerror and be redirected. UponASKredirection, a multi-key command may return aTRYAGAINerror (triggering a retry), while theSETcommand succeeds immediately. This can result in an unintended reordering of commands if the first command is retried after the slot stabilizes:Note: Currently, retry strategies are supported only for non-atomic batches.