- Notifications
You must be signed in to change notification settings - Fork311
New pool scaffolding#3352
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
New pool scaffolding#3352
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
Adds scaffolding for a new V2 connection pool implementation, introduces an app-context switch, and simplifies the existing pool API by privatizing and renaming methods.
- Introduce
UseConnectionPoolV2
switch inLocalAppContextSwitches
- Rename
PutObject
toReturnInternalConnection
and mark methods private where appropriate - Add
ChannelDbConnectionPool
stub and switch selection logic inDbConnectionPoolGroup
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
LocalAppContextSwitches.cs | AddedUseConnectionPoolV2 switch constant, backing field, and property |
WaitHandleDbConnectionPool.cs | Privatized pool internals, renamedPutObject calls toReturnInternalConnection , updated argument names |
DbConnectionPoolGroup.cs | Switched instantiation betweenWaitHandleDbConnectionPool andChannelDbConnectionPool based on the new switch |
DbConnectionPool.cs | Renamed abstractPutObject toReturnInternalConnection , removed obsolete methods |
ChannelDbConnectionPool.cs | Added new stub class with unimplemented methods |
DbConnectionInternal.cs | Updated internal call fromPutObject toReturnInternalConnection |
*.csproj (netfx/netcore) | AddedChannelDbConnectionPool to project files, relocatedWaitHandleDbConnectionPool entries |
Comments suppressed due to low confidence (1)
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/ChannelDbConnectionPool.cs:22
- All methods in ChannelDbConnectionPool are currently stubs throwing NotImplementedException. Without implementations and corresponding tests, switching to V2 will break at runtime. Add implementations (or at least safe fallbacks) and unit tests before enabling this path.
internal override int Count => throw new NotImplementedException();
...icrosoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/DbConnectionPoolGroup.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
...oft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/WaitHandleDbConnectionPool.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
codecovbot commentedMay 15, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #3352 +/- ##==========================================- Coverage 65.16% 58.65% -6.52%========================================== Files 300 293 -7 Lines 65379 65073 -306 ==========================================- Hits 42606 38169 -4437- Misses 22773 26904 +4131
Flags with carried forward coverage won't be shown.Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Some simple doc fixes, and a philosophical question.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/DbConnectionPool.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/DbConnectionPool.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/DbConnectionPool.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
...icrosoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/DbConnectionPoolGroup.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/DbConnectionPool.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
...rosoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/ChannelDbConnectionPool.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/LocalAppContextSwitches.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
@imasud00@paulmedynski I've addressed your comments if you can take another look, please |
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/IDbConnectionPool.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/IDbConnectionPool.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
...oft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/WaitHandleDbConnectionPool.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Some comments I'd like addressed, some comments don't matter that much.
...rosoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/ChannelDbConnectionPool.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
...rosoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/ChannelDbConnectionPool.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
...rosoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/ChannelDbConnectionPool.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/IDbConnectionPool.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/IDbConnectionPool.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
...oft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/WaitHandleDbConnectionPool.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/LocalAppContextSwitches.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
...oft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/WaitHandleDbConnectionPool.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks good, thanks for addressing the comments
...rosoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/ChannelDbConnectionPool.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
imasud00 left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectionPoolTest/ConnectionPoolTest.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
We're also missing some switches in :
src/Microsoft.Data.SqlClient/tests/FunctionalTests/LocalAppContextSwitchesTests.cs
Can you add the currently missing ones and your new switch?
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectionPoolTest/ConnectionPoolTest.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectionPoolTest/ConnectionPoolTest.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectionPoolTest/ConnectionPoolTest.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Sure, removing the test is acceptable too 😅
e25b768
intodotnet:mainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This is the first PR targeting#3356. The goal of this PR is to be non-disruptive and create a separate workspace for the new connection pool implementation.
To see the POC implementation, take a look at#3211