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

keys命令会导致list操作失败 #373

Closed
littlechaser opened this issue Oct 17, 2018 · 4 comments
Closed

keys命令会导致list操作失败 #373

littlechaser opened this issue Oct 17, 2018 · 4 comments

Comments

@littlechaser
Copy link

使用jedis客户端,多线程环境,若干个list。一个线程使用keys方法获取符合条件的所有list的key名称,由于key的数量比较多,执行时间较长,此期间另一个线程对这些key进行rpush操作,发现rpush操作失败,其他命令尚未验证是否可行。

@Axlgrep
Copy link
Collaborator

Axlgrep commented Oct 19, 2018

用的Pika是什么版本,用的时候Pika开了几个线程?

@littlechaser
Copy link
Author

用的Pika是什么版本,用的时候Pika开了几个线程?

2.3.3版本,单线程

@Axlgrep
Copy link
Collaborator

Axlgrep commented Oct 19, 2018

改成多线程就可以了, rpush并不是失败了,而是需要等到前面那个keys命令执行完毕才轮到它执行

@littlechaser
Copy link
Author

改成多线程就可以了, rpush并不是失败了,而是需要等到前面那个keys命令执行完毕才轮到它执行

搜嘎,结案了。

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

No branches or pull requests

2 participants