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

Wrong db index of rpush and lpop #1667

Closed
wildfire810 opened this issue Oct 19, 2022 · 2 comments · Fixed by #1721
Closed

Wrong db index of rpush and lpop #1667

wildfire810 opened this issue Oct 19, 2022 · 2 comments · Fixed by #1721

Comments

@wildfire810
Copy link

When I create redis client instance, I give a db param is 1
static RedisConfig: RedisOptions = {
port: 6379,
host: ServerSettings.redisInfo.host,
family: 4,
password: "2333",
db: 1,
enableAutoPipelining: true,
};

and I rpush a binary value to the list.
await this.redis.rpush(keyStr, msgs);

surprise, the list is in DB0

but lpop can not read the value.

if the db param is 0, it is all right.

@wildfire810
Copy link
Author

If I use await this.redis.select(x)
before rpush and lpop,
it will be ok.

@github-actions
Copy link

🎉 This issue has been resolved in version 5.3.1 🎉

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants