-
Notifications
You must be signed in to change notification settings - Fork 1.9k
client.isReady returns true even when it's not actually ready #2667
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
Comments
|
Being alive (or responding to pings) is wholly different from being |
As far as I understand checking to see if data has finished loading from the disk is the behavior using https://github.com/redis/node-redis/blob/master/CHANGELOG.md#v055---february-16-2011 The scenario to reproduce: What is the recommended way of handling such an error (also in production scenario you possibly access data from Redis through a dedicated handler)? Run:
Code (
Tail of
Tail of
|
Looking for a solution to this as well! |
Description
Since there has been some behavioral change that I have not seen mention anywhere, I have been trying to find a good way to handle
LOADING Redis is loading the dataset in memory
errors when restarting from a large rdb file. Something that apparently was handled differently in past releases (either Redis or npm redis).One of the methods I had intended to use is the client.isReady.
Unfortunately it seems to return true even when redis is still not quite ready.
Replication steps:
Fill a redis server with junk data, enough for it to take a few seconds to load from disk.
Write a script that connects to it and once the
client.isReady
returns true, attempt a PING command.You'll find that it still fails to
LOADING Redis is loading the dataset in memory
Node.js Version
16.20.2
Redis Server Version
7.2.3
Node Redis Version
4.6.8
Platform
No response
Logs
No response
The text was updated successfully, but these errors were encountered: