10000 mGet on redisarray returns false on some pairs of keys · Issue #436 · phpredis/phpredis · GitHub
[go: up one dir, main page]

Skip to content

mGet on redisarray returns false on some pairs of keys #436

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

Closed
koda611 opened this issue Feb 20, 2014 · 2 comments
Closed

mGet on redisarray returns false on some pairs of keys #436

koda611 opened this issue Feb 20, 2014 · 2 comments

Comments

@koda611
Copy link
koda611 commented Feb 20, 2014

Hi, I am using redisarray locally with 2 redis instances on 2 different ports and sometimes mGet will return false on a pair of keys even though I can retrieve them individually using get.

The redis client I am using is 2.2.4 and the redis server is 2.8.6.

Here is the pair of keys that will cause it to fail. "abc:1" and "abc:4".
To reproduce this, my redisarray is initialized to array("127.0.0.1:6379", "127.0.0.1:6380")
and I set both keys individually, and then calling mget with both keys.

@michael-grunder
Copy link
Member

Hey there,

I'll check that as well.

michael-grunder added a commit that referenced this issue Feb 21, 2014
The MGET call in RedisArray was failing under circumstances where
none of the passed keys hashed into any given node in the ring.
What was happening is that RedisArray was passing through to the
phpredis MGET command an empty array, which was returning false.
This in turn caused RedisArray to abort the process and return
false as well.

This change updates RedisArray MGET such that if a given node
doesn't have any keys, we skip the call to it all together.

Addresses #435
Addresses #436
@michael-grunder
Copy link
Member

This appears to work, closing.

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
0