Skip to content

fix: release newly created runner when no runner provided - #8969

Merged
pleerock merged 2 commits into
typeorm:masterfrom
imadx:master
Jun 29, 2022
Merged

pleerock merged 2 commits into
typeorm:masterfrom
imadx:master

Conversation

@imadx

@imadx imadx commented May 5, 2022 •

Copy link
Copy Markdown
Contributor

Description of change

Fixes #4866

When calling DbQueryResultCache.remove, if the optional queryRunner is not provided, currently, a new runner is created.
This new runner is not released after executing the query.

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

Release newly created runner when no runner is provided as an argument
which resolves the issue of exhausting query runners
when calling `DbQueryResultCache.remove`

Closes: typeorm#4866
@imadx

imadx commented Jun 4, 2022

Copy link
Copy Markdown
Contributor Author

Do ping me if this requires any documentation update or test changes. Happy to help on getting this merged.

@pleerock
pleerock merged commit ec05f1d into typeorm:master Jun 29, 2022
@pleerock

Copy link
Copy Markdown
Member

Thank you a lot for this wonderful fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

TypeORM becomes unresponsive after this code is run 10x

2 participants