hackpar / redis

Automatically exported from code.google.com/p/redis
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Replication - slave out of sync - concurrency related - repro attached #561

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What version of Redis you are using, in what kind of Operating System?

reproduced on: 2.2.7 and 2.2.8
CentOS 5 - Linux 2.6.18-53.1.21.el5 

What is the problem you are experiencing?

- Running two Redis instances in master/slave configuration
- Under some usage patterns, the slave gets out of sync with the master

What steps will reproduce the problem?

- See attached zip file.  It contains a Java program that will consistently 
repro the problem
- See included README.  redis conf files for master and slave are included
- One note: when we use 1 producer and 1 consumer, we do not see this issue.  
with 1 producer and 10 consumers we see it consistently.  the consumer is 
running the transaction to receive messages, and that appears to be where the 
issue exists.

Please contact me if you have trouble running the base repro case.  I've 
included all required JAR files in the zip.  there's a "run.sh" shell script 
that will compile the Java code and run it.

Original issue reported on code.google.com by jamespco...@gmail.com on 25 May 2011 at 3:42

Attachments:

GoogleCodeExporter commented 8 years ago
Thank you for reporting this bug and providing the script to reproduce it. I'll 
try to run it in a moment. More news asap.

Original comment by anti...@gmail.com on 26 May 2011 at 8:40

GoogleCodeExporter commented 8 years ago
Bug confirmed, the issue is in BRPOPLPUSH implementation. A fix will be 
available in short time... I'll take you posted via this issue comments.

Original comment by anti...@gmail.com on 26 May 2011 at 9:42

GoogleCodeExporter commented 8 years ago
Hello, the branch '2.2-issue-561' at github contains the fix for this bug and a 
memory leak in the BRPOPLPUSH unrelated to this bug, but that your Java issue 
reproduction program was able to trigger.

Thanks for everything. After furhter testing, and some refactoring I'm doing, 
all this will be merged into 2.2 and a new version of redis will be released.

Salvatore

Original comment by anti...@gmail.com on 27 May 2011 at 1:16

GoogleCodeExporter commented 8 years ago
Salvatore,

Thanks again for your prompt work on this!  I look forward to trying out the 
next release.

-- James

Original comment by jamespco...@gmail.com on 27 May 2011 at 3:41