Skip to content

Merge | TdsParserStateObject lifetime-related methods #3394

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

Open
wants to merge 34 commits into
base: main
Choose a base branch
from

Conversation

edwardneal
Copy link
Contributor

Description

We're now merging the lifetime-related methods on TdsParserStateObject in netfx, making them abstract and pushing them down to the derived TdsParserStateObjectNative class. This also handles some slightly unusual logic in CreatePhysicalSNIHandle, since spns is a string in netfx and a string array in netcore. I've needed to merge this type handling too.

Commit 469d840 onwards moves method-by-method. I've moved:

  • CreatePhysicalSNIHandle
  • AssignPendingDNSInfo
  • CreateSessionHandle
  • FreeGcHandle
  • Dispose

Relates to #1261.

edwardneal added 29 commits May 16, 2025 19:36
Also move ReadSyncOverAsync down in netcore's TdsParserStateObjectNative to aid later merge
Also reorder member in TdsParserStateObjectNative to simplify later merge
This also allows _writePacketCache to be migrated to TdsParserStateObjectNative in netfx.
@edwardneal edwardneal requested a review from a team as a code owner June 5, 2025 06:51
@cheenamalhotra
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Copy link

codecov bot commented Jun 12, 2025

Codecov Report

Attention: Patch coverage is 88.65979% with 11 lines in your changes missing coverage. Please review.

Project coverage is 60.03%. Comparing base (12f742d) to head (76a97d3).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...nt/netfx/src/Microsoft/Data/SqlClient/TdsParser.cs 57.89% 8 Missing ⚠️
.../netcore/src/Microsoft/Data/SqlClient/TdsParser.cs 50.00% 2 Missing ⚠️
...osoft/Data/SqlClient/TdsParserStateObjectNative.cs 98.55% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3394      +/-   ##
==========================================
- Coverage   63.51%   60.03%   -3.48%     
==========================================
  Files         293      285       -8     
  Lines       63810    63405     -405     
==========================================
- Hits        40526    38067    -2459     
- Misses      23284    25338    +2054     
Flag Coverage Δ
addons ?
netcore 63.29% <66.66%> (-3.65%) ⬇️
netfx 61.92% <90.10%> (-4.30%) ⬇️

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.

@benrr101
Copy link
Contributor

/azp run

@benrr101 benrr101 added the Common Project 🚮 Things that relate to the common project project label Jun 23, 2025
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@benrr101 benrr101 added this to the 7.0-preview1 milestone Jun 23, 2025
benrr101
benrr101 previously approved these changes Jun 23, 2025
Copy link
Contributor

@benrr101 benrr101 left a comment

Choose a reason for hiding this comment

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

Overall, love it - sorry it took so long to get it looked at. Couple questions, but looking forward to merging.

@benrr101
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

benrr101
benrr101 previously approved these changes Jun 26, 2025
@benrr101 benrr101 requested a review from a team June 26, 2025 22:31
mdaigle
mdaigle previously approved these changes Jul 1, 2025
@@ -408,28 +414,17 @@ internal void Connect(ServerInfo serverInfo,
}
}

_serverSpn = null;
Copy link
Contributor

Choose a reason for hiding this comment

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

duplicate of line 400

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks - removed from netfx and netcore.

@edwardneal edwardneal dismissed stale reviews from mdaigle and benrr101 via 879246a July 2, 2025 20:33
@benrr101
Copy link
Contributor

benrr101 commented Jul 8, 2025

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Common Project 🚮 Things that relate to the common project project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants