efcore
efcore copied to clipboard
[release/7.0] Move taking of lock earlier to avoid race in PruneCallback
This is a port of #30080 Fixes #29952
Description
The field _idlePoolGroups was being used outside the lock.
Customer impact
ArgumentOutOfRangeException exceptions when using Microsoft.Data.Sqlite, even without connection pooling.
How found
Multiple customer reports on 7.0.
Regression
No.
Testing
Manual testing.
Risk
Low; simple move of the lock area, and a quirk was added to revert back to older behavior.
/azp run
Azure Pipelines successfully started running 1 pipeline(s).