8000 mget returns false if array has one key · Issue #435 · phpredis/phpredis · GitHub
[go: up one dir, main page]

Skip to content

mget returns false if array has one key #435

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 · 3 comments
Closed

mget returns false if array has one key #435

koda611 opened this issue Feb 20, 2014 · 3 comments

Comments

@koda611
Copy link
koda611 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

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

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

Merged and in master/develop, 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