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

internal/client: remove the lock for idle connection recycle #277

Closed
wants to merge 1 commit into from

Conversation

tiancaiamao
Copy link
Contributor

After mock testing, I find #270 can not sufficient to solve the problem.
To my surprise, RLock can block RLock in some case

The final decision is to reduce the granularity of the lock.
Just lock the modification of the map...

There is a risk that an idle connection become active again, since recycleMu is removed to protect such case.
In very rare case, someone is maybe using the connection and the connection is closed by the recycle operation.

I think the outcome is acceptable, comparing to the recycle operation blocks the SendRequest() function.

@tiancaiamao tiancaiamao deleted the remove-recycle-lock branch August 20, 2021 08:00
@tiancaiamao
Copy link
Contributor Author

Damn ... the DCO check ... I open a new one #278

@disksing
Copy link
Collaborator

Damn ... the DCO check ... I open a new one #278

you can reset + commit with DCO + push -f
you can also run this script + push -f

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