-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
fix: Redis 4 does not reconnect after unhandled error in RedisPubSub.js
#9571
base: alpha
Are you sure you want to change the base?
Conversation
Signed-off-by: Chris Grant <[email protected]>
Thanks for opening this pull request! |
Is it possible to add a test case? |
@mtrezza I'm not sure how you would add a test case for this fix as it does seem to be largely dependent on the redis connecting timing out and I'm not sure how you'd replicate this during testing. There was no test case on the previous PR (#8706) so I presumed this one wouldn't require a test case either. Happy to be told that I'm wrong though if you can offer some advice / a starting point on where I could add one! |
I haven't looked, but if you say that the test setup currently doesn't allow for Redis connection testing, then let's merge as is. Edit: I have looked and it seems that the Redis server connection is currently not managed as part of the individual tests. |
RedisPubSub.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please take a look, the CI is falling.
Pull Request
PR #8706 added empty handlers to
src/Adapters/Cache/RedisCacheAdapter.js
.It did not add the empty handlers to RedisPubSub.js, meaning that this issue was closed but not completely fixed when RedisPubSub.js is in use.
Issue
Closes: #8705
Approach
Adds mostly empty event handlers to the Redis client, which is now required for Redis 4.
NB: Please let me know if it would be better to open a new issue for this rather than referring to the original (closed) issue, but I do believe that it is the same issue that hasn't been fixed in a certain area. I've tested the fix in my production environment and it does seem to fix the problem I have been having for a while now.