Skip to content

Fix for multi operations with detect_buffers enabled #471

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
wants to merge 3 commits into from

Conversation

jezell
Copy link

@jezell jezell commented Aug 4, 2013

This fixes #263 where multi operations that properly should return arrays, return strings instead when detect_buffers: true.

@brycebaril
Copy link
Contributor

Hi @jezell thank you for submitting! Think you could write up a couple tests in https://github.com/mranney/node_redis/blob/master/test.js to verify the patch works?

Thanks!

@jezell
Copy link
Author

jezell commented Aug 4, 2013

Sure thing

@ifraixedes
Copy link

+1

@jmonster
Copy link

just got bit by this -- 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍

@brycebaril
Copy link
Contributor

@jmonster did you try the patch to see if it solved the problem? If so I will look into writing tests for this as @jezell hasn't been able to yet. Anyone else willing to write some tests for this would be very welcome :)

@ifraixedes
Copy link

@brycebaril, I wrote them, check the pull request #517.

@brycebaril
Copy link
Contributor

Ahh, after spending some time reading the code I see an issue here -- it is incompatible with the hiredis (or other) parsers.

We'll need to look for a way to either do this enitrely in the parser, or entirely in the library. The parser tacking on data onto the Buffer and then using that data in the library creates a significant API change for parsers.

@jezell
Copy link
Author

jezell commented Mar 17, 2014

Setting the redisType value on the buffer was only needed to return integers as buffers. Looks like hiredis won't ever return a buffer unless the result is a string. Updated javascript parser so the behavior matches and removed the extra data from the buffer obj.

@BridgeAR
Copy link
Contributor

BridgeAR commented Sep 8, 2015

This got fixed by #733. @jezell if I understand you correct the js parser is still not in line with hiredis? Would you be so kind and open another PR with fixing that issue and include a test for that?

@BridgeAR BridgeAR closed this Sep 8, 2015
@BridgeAR
Copy link
Contributor

@jezell the parser part seems to still be needed. Would you mind rebasing?

@BridgeAR BridgeAR mentioned this pull request Sep 16, 2015
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

Successfully merging this pull request may close these issues.

detect_buffers implementation broken for multi/exec
5 participants