Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: respect ctx in cmds run within DialContext #620

Merged
merged 1 commit into from
Jul 1, 2022

Conversation

mitchsw
Copy link
Contributor

@mitchsw mitchsw commented Jun 28, 2022

The DialContext() function does not use the new DoContext() methods (added in v1.8.6) when configuring auth/clientName/db during connection creation. If the Redis server is unresponsive, this can cause DialContext() to run for a very long time (instead of cancelling when the deadline is exceeded). DoContext should be used for these cmds.

Repro steps:

  1. Make Redis unresponsive: CLIENT PAUSE 36000000 ALL
  2. Attempt to DialContext() with a 1sec timeout
  3. Command is unexpectedly blocked for a long time

@mitchsw mitchsw changed the title fix: respect ctx in cmds run in DialContext fix: respect ctx in cmds run within DialContext Jun 28, 2022
@mitchsw
Copy link
Contributor Author

mitchsw commented Jul 1, 2022

Thanks @stevenh! Is it possible to please merge & tag this fix?

@stevenh stevenh merged commit 95c091f into gomodule:master Jul 1, 2022
@stevenh
Copy link
Collaborator

stevenh commented Jul 11, 2022

To make sure you didn't miss it tag was done last week @mitchsw

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants