You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a distinct exception type for READONLY errors so that users can handle these in a clean way.
Is your feature request related to a problem? Please describe
With some Redis setups (e.g. HAProxy abstracting Redis/Sentinel setup), clients are forced to handle failovers by re-creating their connection when they receive READONLY errors.
Describe the solution you'd like
From io.lettuce.core.internalExceptionFactory:
Specific Redis error messages may create subtypes of {@link RedisCommandExecutionException}.
Therefore I'd like to have a RedisReadOnlyException, similar to the existing RedisLoadingException.
Describe alternatives you've considered
Clients can already handle this by checking the message of a RedisCommandExecutionException for READONLY.
Redis instances in read-only mode will reply with a `READONLY` error
message when a write is attempted. This change allows users to
specifically handle these errors.
Original pull request: #1944.
Redis instances in read-only mode will reply with a `READONLY` error
message when a write is attempted. This change allows users to
specifically handle these errors.
Original pull request: #1944.
Feature Request
Add a distinct exception type for
READONLY
errors so that users can handle these in a clean way.Is your feature request related to a problem? Please describe
With some Redis setups (e.g. HAProxy abstracting Redis/Sentinel setup), clients are forced to handle failovers by re-creating their connection when they receive
READONLY
errors.Describe the solution you'd like
From
io.lettuce.core.internalExceptionFactory
:Therefore I'd like to have a
RedisReadOnlyException
, similar to the existingRedisLoadingException
.Describe alternatives you've considered
Clients can already handle this by checking the message of a
RedisCommandExecutionException
forREADONLY
.Teachability, Documentation, Adoption, Migration Strategy
Users can implement custom code based on the new exception type.
The text was updated successfully, but these errors were encountered: