★ wanayoo — archive 1999 https://github.com/phpredis/phpredis/issues/435Nouvelle recherche | Portail wanayoo
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

mget returns false if array has one key #435

Closed
koda0611 opened this issue Feb 20, 2014 · 3 comments
Closed

mget returns false if array has one key #435

koda0611 opened this issue Feb 20, 2014 · 3 comments

Comments

@koda0611
Copy link

@koda0611 koda0611 commented Feb 20, 2014

If the array of keys only has 1 key, mget on RedisArray returns false. Shouldn't this still return the correct value?

@michael-grunder
Copy link
Member

@michael-grunder michael-grunder commented Feb 20, 2014

Hey,

This is interesting and I can also replicate the behavior. This is likely something simple and I should have a bit of time this afternoon to take a look at couple of the recent issues.

Cheers,
Mike

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

@michael-grunder michael-grunder commented Feb 21, 2014

Hey,

I have sorted this problem in the branch hotfix/mget_skip_empty. Please make sure it works for you and I'll get it merged into master. This bug is the same reason #436 is happening.

Cheers!
Mike

@michael-grunder
Copy link
Member

@michael-grunder michael-grunder commented Feb 21, 2014

Merged and in master/develop, closing.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.