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

fix: pass error to pgpool release #9209

Merged
merged 1 commit into from
Aug 24, 2022

Conversation

bryfox
Copy link
Contributor

@bryfox bryfox commented Jul 16, 2022

Description of change

I believe the intent in #7792 was to pass the error, if any, to the release callback from pg-pool, but it doesn't look like the error wasn't actually propagated through that release callback. The original issue (#5112) describes the motivation. #9055 also looks related.

Existing tests don't appear to cover this branch, and I haven't added any here. I validated this by adding logging and following the suggested steps in #5112: issue a long-running query, and kill the process or container. I note that with the steps I took, pg-pool still managed to clean up properly by seeing that the client is not _queryable, but I imagine there are cases where this wouldn't happen.

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • npm run format to apply prettier formatting
  • npm run test passes with this change
  • This pull request links relevant issues as Fixes #0000
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change
  • The new commits follow conventions explained in CONTRIBUTING.md

This extends github PR typeorm#7792 to pass the error, if any, to the release
callback from `pg-pool`. This should be done to ensure the connection is
removed from the pool, as described in typeorm#5112.
@pleerock pleerock merged commit eb8f0c6 into typeorm:master Aug 24, 2022
@pleerock
Copy link
Member

Thank you for contribution! 🎉

wirekang pushed a commit to wirekang/typeorm that referenced this pull request Aug 25, 2022
This extends github PR typeorm#7792 to pass the error, if any, to the release
callback from `pg-pool`. This should be done to ensure the connection is
removed from the pool, as described in typeorm#5112.
nordinh pushed a commit to nordinh/typeorm that referenced this pull request Aug 29, 2022
This extends github PR typeorm#7792 to pass the error, if any, to the release
callback from `pg-pool`. This should be done to ensure the connection is
removed from the pool, as described in typeorm#5112.
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