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

Merge | DbConnectionInternal (w/Cleaning) #2909

Closed

Conversation

benrr101
Copy link
Contributor

Description: This PR aims to merge DbConnectionInternal from the netfx and netcore projects. The strategy for this merge is to move the netfx version of the class over (since it has the entire class in one file) and do a two-step merge of the two netcore files. Once combined, the bulk of the code has no differences between the netfx and netcore implementations. The only major difference is that netfx has a collection of performance counters that are updated in certain scenarios.

The commits are broken up into fairly digestible chunks that explain each step along the process. I'd recommend reviewing the PR by stepping through the commits and seeing if you agree with the changes. Nevertheless, this PR has a lot of code cleanup changes at the end that make the overall PR fairly large. In anticipation of pushback on this, I will offer a separate PR that only contains the merge changes. If that one is accepted, I'll still send out the cleanup change on a separate PR. But, I think this option would be faster overall. Ideally there is some other cleanup tasks that could be done (public -> internal, protected -> private, etc), but those changes require larger picture understanding of the class hierarchy.

Behavioral Changes: The method DbConnectionInternal.DoomThisConnection() logs a trace event, but DbConnectionInternal.UnDoomThisConnection() does not. I added a trace event of the same format to UnDoomThisConnection to make it match.

Testing: Most of the functional tests run locally, though I'm having some difficulty with getting all tests to work. These issues happen main branch as well, so I assume it is unrelated to the code changes.

@benrr101 benrr101 changed the title Common dbconnectioninternal cleanup Merge | DbConnectionInternal (Opt w/Cleaning) Oct 10, 2024
@benrr101 benrr101 changed the title Merge | DbConnectionInternal (Opt w/Cleaning) Merge | DbConnectionInternal (w/Cleaning) Oct 10, 2024
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 30 lines in your changes missing coverage. Please review.

Project coverage is 70.60%. Comparing base (39c4604) to head (1582322).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...icrosoft/Data/ProviderBase/DbConnectionInternal.cs 79.86% 30 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2909      +/-   ##
==========================================
- Coverage   71.92%   70.60%   -1.32%     
==========================================
  Files         294      216      -78     
  Lines       60342    40783   -19559     
==========================================
- Hits        43398    28793   -14605     
+ Misses      16944    11990    -4954     
Flag Coverage Δ
addons 92.90% <ø> (ø)
netcore ?
netfx 70.42% <80.00%> (-0.03%) ⬇️

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.

@cheenamalhotra cheenamalhotra added this to the 6.0-preview2 milestone Oct 15, 2024
@benrr101
Copy link
Contributor Author

Moving back to draft to since the merge-only PR got merged.

@benrr101 benrr101 marked this pull request as draft October 24, 2024 22:18
@benrr101 benrr101 closed this Oct 28, 2024
@benrr101 benrr101 deleted the common-dbconnectioninternal-cleanup branch October 28, 2024 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants