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

reset cluster context errors in redisClusterAsyncFormattedCommandToNode #67

Merged

Conversation

andreasgerstmayr
Copy link
Contributor

Analogue to redisClusterAsyncFormattedCommand, where the acc and acc->cc
errors are reset before sending the request.

Reason: The redisClusterAsyncCallback callback checks acc->err and omits the
reply if it is set.

Analogue to redisClusterAsyncFormattedCommand, where the acc and acc->cc
errors are reset before sending the request.

Reason: The redisClusterAsyncCallback callback checks acc->err and omits the
reply if it is set.
@zuiderkwast
Copy link
Collaborator

Good, I guess. Is a test case too much to ask? ;-)

@andreasgerstmayr
Copy link
Contributor Author

@zuiderkwast that's actually not as easy as it sounds ;) - afaics I'll need to create a new test script in tests/scripts/ which uses simulated-redis.pl in order to simulate an intermediate Redis disconnect (I need to get a NULL reply from hiredis to make redisClusterAsyncCallback set the acc->err flag)?

I'll look into that next week.

@zuiderkwast
Copy link
Collaborator

that's actually not as easy as it sounds ;)

Oh, well, maybe we can accept this PR without a test then. @bjosv WDYT?

A test is of course very welcome, but perhaps not blocking. (I spent some time with these Perl scripts for testing ASK redirects. I hope you like the way these scripts work, and Perl. :-D)

Copy link
Collaborator

@bjosv bjosv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its ok without a test for now, we don't have any for the similar case of redisClusterAsyncFormattedCommand() ..but a test would sure be great.

@zuiderkwast
Copy link
Collaborator

OK, fine with me then. I haven't followed the code around enough to see if this is right, but if you're confident @bjosv, feel free to merge!

@bjosv bjosv merged commit 512a790 into Nordix:master Nov 8, 2021
@andreasgerstmayr
Copy link
Contributor Author

Thanks for merging! Test is in #68.

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.

3 participants