Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
mdaigle merged 19 commits intodotnet:mainfrommdaigle:dev/mdaigle/new-pool-scaffolding
May 22, 2025

Conversation

mdaigle
Copy link
Contributor

@mdaiglemdaigle commentedMay 15, 2025
edited
Loading

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.

  • Introduces an app context switch to control pool version used
  • Adds a shim class for the new connection pool implementation.
  • Marks DbConnectionPool methods that are only called from within the class as private to simplify the API.
  • Renames PutObject to ReturnInternalConnection for clarity.

To see the POC implementation, take a look at#3211

edwardneal reacted with rocket emoji
@CopilotCopilotAI review requested due to automatic review settingsMay 15, 2025 21:52
@mdaiglemdaigle requested a review froma team as acode ownerMay 15, 2025 21:52
Copilot

This comment was marked as outdated.

@mdaiglemdaigle requested a review fromCopilotMay 15, 2025 21:59
Copy link
Contributor

@CopilotCopilotAI left a 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.

  • IntroduceUseConnectionPoolV2 switch inLocalAppContextSwitches
  • RenamePutObject toReturnInternalConnection and mark methods private where appropriate
  • AddChannelDbConnectionPool 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
FileDescription
LocalAppContextSwitches.csAddedUseConnectionPoolV2 switch constant, backing field, and property
WaitHandleDbConnectionPool.csPrivatized pool internals, renamedPutObject calls toReturnInternalConnection, updated argument names
DbConnectionPoolGroup.csSwitched instantiation betweenWaitHandleDbConnectionPool andChannelDbConnectionPool based on the new switch
DbConnectionPool.csRenamed abstractPutObject toReturnInternalConnection, removed obsolete methods
ChannelDbConnectionPool.csAdded new stub class with unimplemented methods
DbConnectionInternal.csUpdated 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();

@codecovCodecov
Copy link

codecovbot commentedMay 15, 2025
edited
Loading

Codecov Report

Attention: Patch coverage is80.00000% with17 lines in your changes missing coverage. Please review.

Project coverage is 58.65%. Comparing base(dc1298a) to head(831dc5b).
Report is 5 commits behind head on main.

Files with missing linesPatch %Lines
...lient/ConnectionPool/WaitHandleDbConnectionPool.cs75.86%14 Missing⚠️
...icrosoft/Data/ProviderBase/DbConnectionInternal.cs80.00%1 Missing⚠️
.../SqlClient/ConnectionPool/DbConnectionPoolGroup.cs91.66%1 Missing⚠️
...icrosoft/Data/SqlClient/LocalAppContextSwitches.cs80.00%1 Missing⚠️

❗ There is a different number of reports uploaded between BASE (dc1298a) and HEAD (831dc5b). Click for more details.

HEAD has 1 upload less than BASE
FlagBASE (dc1298a)HEAD (831dc5b)
addons10
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
FlagCoverage Δ
addons?
netcore62.75% <80.00%> (-5.67%)⬇️
netfx59.60% <80.00%> (-6.73%)⬇️

Flags with carried forward coverage won't be shown.Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

🚀 New features to boost your workflow:
  • ❄️Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@paulmedynskipaulmedynski left a 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.

@mdaigle
Copy link
ContributorAuthor

@imasud00@paulmedynski I've addressed your comments if you can take another look, please

paulmedynski
paulmedynski previously approved these changesMay 16, 2025
Copy link
Contributor

@benrr101benrr101 left a 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.

benrr101
benrr101 previously approved these changesMay 19, 2025
Copy link
Contributor

@benrr101benrr101 left a 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

imasud00
imasud00 previously approved these changesMay 19, 2025
Copy link

@imasud00imasud00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

:shipit:

Copy link
Contributor

@paulmedynskipaulmedynski left a 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?

Copy link
Contributor

@benrr101benrr101 left a 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 😅

@mdaiglemdaigle merged commite25b768 intodotnet:mainMay 22, 2025
237 checks passed
@mdaiglemdaigle deleted the dev/mdaigle/new-pool-scaffolding branchMay 22, 2025 15:57
@paulmedynskipaulmedynski added this to the6.1-preview2 milestoneJun 23, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@benrr101benrr101benrr101 approved these changes

@paulmedynskipaulmedynskipaulmedynski approved these changes

@imasud00imasud00imasud00 left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
6.1-preview2
Development

Successfully merging this pull request may close these issues.

4 participants
@mdaigle@benrr101@imasud00@paulmedynski

[8]ページ先頭

©2009-2025 Movatter.jp