Skip to content

Make it easier to discern between errors from Redis Sentinel vs. Redis nodes #177

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

Closed
stanhu opened this issue Feb 15, 2024 · 1 comment · Fixed by #178
Closed

Make it easier to discern between errors from Redis Sentinel vs. Redis nodes #177

stanhu opened this issue Feb 15, 2024 · 1 comment · Fixed by #178

Comments

@stanhu
Copy link
Contributor

stanhu commented Feb 15, 2024

Related to #176, we had a difficult time discerning that ERR max number of clients reached was sent from the Redis Sentinels instead of the Redis nodes when Redis::CommandError was raised.

Some ideas to improve this:

  1. Raise a different exception, such as Redis::Sentinel::CommandError.
  2. Add more details in the error message to identify the host that originated the error.
@byroot
Copy link
Member

byroot commented Feb 15, 2024

2 makes sense, we should attach the config to the raised exception and render the server url in there (without password obviously).

stanhu added a commit to stanhu/redis-client that referenced this issue Feb 16, 2024
Previously when an error were received by a Redis server, it was not
clear whether this came from a Redis Sentinel or a Redis server in the
cluster. This commit adds the hostname/port of the server to the
exception message via a log context.

Note that this commit also fixes an existing bug where an error in a
MULTI/EXEC command would not properly be processed.

Closes redis-rb#177
stanhu added a commit to stanhu/redis-client that referenced this issue Feb 16, 2024
Previously when an error were received by a Redis server, it was not
clear whether this came from a Redis Sentinel or a Redis server in the
cluster. This commit adds the hostname/port of the server to the
exception message via a log context.

Note that this commit also fixes an existing bug where an error in a
MULTI/EXEC command would not properly be processed.

Closes redis-rb#177
stanhu added a commit to stanhu/redis-client that referenced this issue Feb 16, 2024
Previously when an error were received by a Redis server, it was not
clear whether this came from a Redis Sentinel or a Redis server in the
cluster. This commit adds the hostname/port of the server to the
exception message via a log context.

Note that this commit also fixes an existing bug where an error in a
MULTI/EXEC command would not properly be processed.

Closes redis-rb#177
stanhu added a commit to stanhu/redis-client that referenced this issue Feb 16, 2024
Previously when an error were received by a Redis server, it was not
clear whether this came from a Redis Sentinel or a Redis server in the
cluster. This commit adds the hostname/port of the server to the
exception message via a log context.

Closes redis-rb#177
stanhu added a commit to stanhu/redis-client that referenced this issue Feb 16, 2024
Previously when an error were received by a Redis server, it was not
clear whether this came from a Redis Sentinel or a Redis server in the
cluster. This commit adds the hostname/port of the server to the
exception message via a log context.

Closes redis-rb#177
stanhu added a commit to stanhu/redis-client that referenced this issue Feb 20, 2024
Previously when an error were received by a Redis server, it was not
clear whether this came from a Redis Sentinel or a Redis server in the
cluster. This commit adds the hostname/port of the server to the
exception message via a log context.

Closes redis-rb#177
stanhu added a commit to stanhu/redis-client that referenced this issue Feb 20, 2024
Previously when an error were received by a Redis server, it was not
clear whether this came from a Redis Sentinel or a Redis server in the
cluster. This commit adds the hostname/port of the server to the
exception message via a log context.

Closes redis-rb#177
casperisfine pushed a commit to stanhu/redis-client that referenced this issue Mar 4, 2024
Previously when an error were received by a Redis server, it was not
clear whether this came from a Redis Sentinel or a Redis server in the
cluster. This commit adds the hostname/port of the server to the
exception message via a log context.

Closes redis-rb#177
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants