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

Bug fix: Mark connection as not good when error on cancellation confirmation #68

Merged
merged 5 commits into from Dec 5, 2022

Conversation

zcolleen
Copy link

This pr fixes bug when we were not able to get cancelation confirmation but connection is not marked as bad and returns to pool, so next time this connection is taken from pool, we get the same error instead of opening new good connection

Example:

r, err := db.QueryContext(ctx, query) <- context expired, then we got cancelation confirmation error

...

r, err := db.QueryContext(ctx, query) <- we get same error because we are still using bad connection instead of opening new one

same as denisenkom#773

Eygin Semen Leonidovich added 3 commits November 14, 2022 14:15
(cherry picked from commit 2258616)
(cherry picked from commit 2fc4276)
@zcolleen
Copy link
Author

@microsoft-github-policy-service agree company="ozontech"

token.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@shueybubbles shueybubbles left a comment

Choose a reason for hiding this comment

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

🕐

Copy link
Collaborator

@shueybubbles shueybubbles left a comment

Choose a reason for hiding this comment

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

:shipit:

@kavu
Copy link

kavu commented Dec 2, 2022

@apoorvdeshmukh @stuartpa @JyotikaGargg Hi! Sorry for pinging you guys. Any chance you can take a look at this one? Really looking forward for this fix to be merged and released, it will help me a lot! Thank you in advance!

@shueybubbles shueybubbles merged commit eaf0b71 into microsoft:main Dec 5, 2022
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

3 participants