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

Handle watch-exec rollback correctly #119

Merged
merged 1 commit into from
Aug 3, 2015

Conversation

suprememoocow
Copy link
Contributor

When using WATCH/EXEC transactions in Redis, if the transaction rolls back (due to one of the watched keys being modified), the EXEC command does not return a result (instead of returning an array).

Currently this leads to utils/wrapMultiResult failing with a TypeError: Cannot read property 'length' of null.

This PR adds tests for WATCH/EXEC (normal and rollback) and fixes the problem by making wrapMultiResult a little more defensive.

luin added a commit that referenced this pull request Aug 3, 2015
Handle watch-exec rollback correctly
@luin luin merged commit 50d48c8 into redis:master Aug 3, 2015
@luin
Copy link
Collaborator

luin commented Aug 3, 2015

Cool! Released in 1.7.3 🍺

@suprememoocow
Copy link
Contributor Author

Wow, that was quick. Thanks so much for your help.

@suprememoocow suprememoocow deleted the watch-exec-fix branch August 3, 2015 13:08
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.

2 participants