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

Move random connection creation to when needed. #882

Merged
merged 1 commit into from
Jun 30, 2023

Conversation

nihohit
Copy link
Contributor

@nihohit nihohit commented Jun 30, 2023

The issue that required the random connection was that we couldn't hold the read lock across an await point, because then the client might start working on a refresh slots/connections operation, try to take the write lock, and a deadlock would be created, because the client stopped working on the requests.

This PR solves the issue by retaking the lock at a later point, where a random connection can be taken without yielding at an await point.

@jaymell jaymell merged commit a5e2ba2 into redis-rs:main Jun 30, 2023
9 checks passed
@nihohit nihohit deleted the move-random branch July 2, 2023 08:49
altanozlu pushed a commit to altanozlu/redis-rs that referenced this pull request Aug 16, 2023
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.

None yet

2 participants