-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
list类型做队列发现数据有丢失的情况 #61
Comments
你试试并发的环境下面是不是需要加锁来做这个事情, 有没有可能是并发的时候不加锁的插入list 导致的问题 |
pika有行锁的,有稳定复现的case吗?发一下吧 |
是pika自带的加锁?还是自己实现。我开wiki里没有相关方法😂 |
@boyxp pika内部有行锁进行保证,不需要上层再做额外保护,如果你那边有复现case可以提供给我们,谢谢 |
用压测工具模拟并发100,持续10秒,无法复现了。 我在线上再试试 |
ok |
AlexStocks
pushed a commit
to ipixiu/pika
that referenced
this issue
Dec 21, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
环境
客户端:php 7
pika_version:2.1.4
os:Linux 2.6.32-573.26.1.el6.x86_64 x86_64
在cli下单进程插入100,000数据到list队列,lpush入rpop出,经测试顺序一致,速度也很快。
然而在web环境下,并发100时,发现队列数据有丢失。跟踪lpush确实插入成功返回值为1,但rpop时会间隔的漏掉1条、3条,不规律,总体情况是100条丢失45条左右。
不知道有么有人遇到过。
后来直接切换到redis的端口,数据正常。因此排除客户端和环境问题。
The text was updated successfully, but these errors were encountered: