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

BRPOPLPUSH and a single LPUSH with several items doesn't work well together #656

Closed
GoogleCodeExporter opened this issue Feb 13, 2016 · 2 comments

Comments

@GoogleCodeExporter
Copy link

This is in the unstable branch (but possibly in the other ones too). Try doing 
the following on a clean Redis instance (in this order):

1. Client A blocks on 'BRPOPLPUSH a b 0'
2. Client B runs 'LPUSH a data1 data2 data3'

Result: 'a' is empty and 'b' contains only "data1". AOF and replication shows 
the same.

The reason is that rpoplpushHandlePush calls rewriteClientCommandVector when 
the first item is pushed to 'a' and that interferes with the pushing of the 
other items. Even if pushGenericCommand was changed so that it would push all 
the items regardless (using a local copy of them), the replication and AOF 
would only register one of the items. This seems to require some minor redesign 
to fix it.

Everything works when BRPOPLPUSH isn't involved, of course.

Original issue reported on code.google.com by hampus.w...@gmail.com on 7 Sep 2011 at 6:55

@GoogleCodeExporter
Copy link
Author

THanks Hampus, this is also present in 2.4 AFAIK, fixing it, and reporting back 
here in this open issue.

Original comment by anti...@gmail.com on 12 Sep 2011 at 2:18

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

https://github.com/antirez/redis/issues/87

Original comment by pcnoordh...@gmail.com on 18 Jan 2012 at 4:22

  • Changed state: Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant