Closed GoogleCodeExporter closed 8 years ago
Hello, it is very unlikely that there is such a problem in Redis. Probably it
is something related to the client library or the application level code
itself. Please use 'redis-cli monitor' to check the number of increments
actually received by the server. Taking this open for now, even if the
probability of this being Redis related is very small.
Original comment by anti...@gmail.com
on 27 May 2011 at 1:20
Thanks for the reply. I will monitor as per your suggestion and report you back
in case I see the issue again. I have seen the problem a couple of times but as
it does not come always, I will keep you updated whenever I see it again.
Thanks.
Original comment by sonal...@gmail.com
on 31 May 2011 at 6:00
I am able to reproduce the problem.
I have used LPUSH command using jedis client to push 1000 items on redis server
with payload size of 1599 bytes each. Each item contains a count as 10.
I have another java program which is running from 2 machines with 50 threads in
it to pop those 1000 items and increment value of a key
"1111_3152011_TotalPublished" using INCRBY command of jedis client by 10 for
each poped item.
Ideally the program should pop 1000 items from list and
"1111_3152011_TotalPublished" should have 10000 but actually it showed 9820.
I ran redis-cli monitor to check how many items were pushed and a value of
"1111_3152011_TotalPublished" key. I can see 1000 items pushed by LPUSH but the
count of INCRBY for "1111_3152011_TotalPublished" is only 982.
I have attached the monitor log to this comment.
Results from redis monitor:
cat reddismon31may7.txt | grep LPUSH | grep netcoreq1 | wc
1000 4294 3590227
cat reddismon31may7.txt | grep INCRBY | grep TotalPublished | wc
982 3928 60884
From redis-cli command line
redis> get 1111_3152011_TotalPublished
"9820"
Any ideas where it is getting wrong?
Original comment by sonal...@gmail.com
on 31 May 2011 at 11:14
Since the number of INCRBY calls is consistent with the counter value (982 and
9280) this is clearly not a Redis problem. Are you sure that you perform an
INCRBY for *every* element you pop, and that there are no race conditions?
Closing this issue.
Original comment by pcnoordh...@gmail.com
on 31 May 2011 at 3:09
Original issue reported on code.google.com by
sonal...@gmail.com
on 27 May 2011 at 12:00