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

[release/6.0] SQLite: Don't modify collection while enumerating inside ReclaimLeakedConnections #27428

Merged
merged 1 commit into from
Mar 2, 2022

Conversation

bricelam
Copy link
Contributor

@bricelam bricelam commented Feb 10, 2022

The existing code to reclaim leaked connections inadvertently modifies a collection while enumerating.

Fixes #27168

Customer impact

Because of this defect, calling methods like SqliteConnection.ClearAllPools() currently throws when an application fails to dispose connection objects.

Regression

Yes. Pooling was added in 6.0 and is enabled by default. There's a new Timer that calls this code on a background thread every 2-4 minutes.

Risk

Low. The updated code more closely mirrors the existing code used by the ODBC, OLE DB, and SqlClient providers.

Verification

Added a new automated test to cover the scenario.

@bricelam bricelam requested a review from a team February 10, 2022 18:46
@AndriySvyryd AndriySvyryd added this to the 6.0.x milestone Feb 10, 2022
@rbhanda rbhanda modified the milestones: 6.0.x, 6.0.4 Feb 15, 2022
@dougbu dougbu merged commit d5de9f0 into dotnet:release/6.0 Mar 2, 2022
@ajcvickers ajcvickers removed this from the 6.0.4 milestone Mar 2, 2022
@bricelam bricelam deleted the leak branch April 14, 2022 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants