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

Adjust README reconnectOnError code sample #1089

Merged
merged 1 commit into from Apr 4, 2020

Conversation

alavers
Copy link
Contributor

@alavers alavers commented Mar 31, 2020

The existing README code sample checks for an error message that begins
with the string READONLY however if the error is produced from a lua
script the condition would not match it. A lua script READONLY error
looks like this:

127.0.0.1:7000> eval "redis.call('set', 'foo', 'bar')" 0
ERR Error running script (call to f_45e87c07f6aff394093b73766a458691d0460655): @user_script:1: @user_script: 1: -READONLY You can't write against a read only replica.

This changes the sample to instead check for READONLY as a substring

The existing README code sample checks for an error message that begins
with the string READONLY however if the error is produced from a lua
script the condition would not match it. A lua script READONLY error
looks like this:

ERR Error running script (call to
f_45e87c07f6aff394093b73766a458691d0460655): @user_script:1:
@user_script: 1: -READONLY You can't write against a read only replica.

This changes the sample to instead check for READONLY as a substring
@luin luin merged commit e22cae6 into redis:master Apr 4, 2020
@alavers alavers deleted the elasticache-readme branch April 6, 2020 19:29
@ioredis-robot
Copy link
Collaborator

🎉 This PR is included in version 4.16.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants