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

Can't use $this->redis->hvals('key') twice #33

Closed
yiichou opened this issue Apr 8, 2013 · 6 comments
Closed

Can't use $this->redis->hvals('key') twice #33

yiichou opened this issue Apr 8, 2013 · 6 comments

Comments

@yiichou
Copy link

yiichou commented Apr 8, 2013

After I used $this->redis->hvals('key') once in a request, I found I can't use any method.
All of them return empty.

@danhunsaker
Copy link
Contributor

Had a similar issue with Redisent. In their case, when handling batch
responses, they were properly handling size values of -1 as null, but not
properly handling size values of 0. If a batch result has a length of
zero, Redis doesn't return any actual values - which makes sense, since it
said it wouldn't. Redisent was interpreting the next value to come back
from Redis as part of the response for the batch request, despite the fact
that it really had nothing to do with that batch whatsoever.

Not sure if we're seeing something similar here, though. I'll try to have
a look later today.

  • Daniel Hunsaker
    Owner / Developer, Lei's Genesis Experiment
    On Apr 8, 2013 8:07 AM, "xworm" notifications@github.com wrote:

After I used $this->redis->hvals('key') once in a request, I found I
can't use any method.
All of them return empty.


Reply to this email directly or view it on GitHubhttps://github.com//issues/33
.

joelcox added a commit that referenced this issue Apr 9, 2013
@joelcox
Copy link
Owner

joelcox commented Apr 9, 2013

Hey everyone,

I tried recreating the issue, but failed to do so. See the commit above this comment. @xworm could you confirm this is what triggers the error?

Thanks for chiming in Dan. I'll look into that.

@yiichou
Copy link
Author

yiichou commented Apr 9, 2013

I agree with @danhunsaker .
I had stored a php array(a hash, in fact) into redis which some of values were empty string. when I used hvals or hgetall, the issue happened. hkeys was okay.
I never tried to use hget to get the empty value, Let me try & see what will be shown.

joelcox added a commit that referenced this issue Apr 10, 2013
@joelcox
Copy link
Owner

joelcox commented Apr 10, 2013

Thanks for your response xworm. I managed to create a failing test case using your last comment. See the commit above. I seemed to have fixed this issue (thanks for the pointer Dan!) in the next commit. Can you please confirm?

12ae166

@yiichou
Copy link
Author

yiichou commented Apr 10, 2013

Thank you for your contribution to CI & Redis, Joelcox & Dan.
This is my first time submitting an issue (I'm not good at English) . I feel very exciting right now
Should I close the issue ?

@yiichou yiichou closed this as completed Apr 10, 2013
@joelcox
Copy link
Owner

joelcox commented Apr 10, 2013

@xworm if this fixes your problem, you can indeed close it. Thanks for reporting your issue! We're unable to find all these edge cases ourselves, so it's thanks to people like you this library is more or less stable.

Thanks again and please keep sending in issues to project you use :)

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

3 participants