Skip to content

Conversation

@edwardneal
Copy link
Contributor

Description

#3582 added functionality to send a small user agent JSON structure to SQL Server. While this works, it also drags in a reflection-based dependency, and the populated reflection-based information is held in memory, preventing the AssemblyLoadContext from being unloaded.

This PR swaps this over to using the built-in source-generated JSON serializer. This should improve performance slightly, and it's the second of a set of changes needed to enable AssemblyLoadContext unloading.

While I don't think this'll be a problem, it's worth noting that this means we'll need to compile the netfx library using the net6.0+ SDK.

Issues

Builds on #3582. Contributes to #1687.

Testing

Automated unit tests continue to function.

@edwardneal edwardneal requested a review from a team as a code owner November 14, 2025 18:57
paulmedynski
paulmedynski previously approved these changes Nov 17, 2025
@paulmedynski paulmedynski self-assigned this Nov 17, 2025
@paulmedynski
Copy link
Contributor

Changes look good, and we should merge this PR even though the design has changed back to pipe-delimited and we won't be using JSON for the User Agent. Still worthwhile to have this in the commit history so we can refer to it in the future if necessary.

@paulmedynski
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 4 pipeline(s).

@paulmedynski
Copy link
Contributor

@edwardneal This will need a rebase/merge from main to pickup the new PR pipeline configs.

@edwardneal
Copy link
Contributor Author

Thanks @paulmedynski, I've just merged and pushed.

@cheenamalhotra
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@github-actions
Copy link

This pull request has been marked as stale due to inactivity for more than 30 days.

If you would like to keep this pull request open, please provide an update or respond to any comments. Otherwise, it will be closed automatically in 7 days.

@github-actions github-actions bot added the Stale The Issue or PR has become stale and will be automatically closed shortly if no activity occurs. label Dec 25, 2025
@apoorvdeshmukh
Copy link
Contributor

@edwardneal Can you rebase with main? I'll kickstart a fresh pipeline run.

@apoorvdeshmukh apoorvdeshmukh removed the Stale The Issue or PR has become stale and will be automatically closed shortly if no activity occurs. label Dec 25, 2025
@edwardneal edwardneal force-pushed the feat/assemblyloadcontext-1687/user-agent-serialization branch from b8c33fb to 3cadb90 Compare December 26, 2025 20:43
@edwardneal
Copy link
Contributor Author

edwardneal commented Dec 26, 2025

Thanks @apoorvdeshmukh, I've just rebased and force-pushed. With that said, I can see #3826 now, and I've got no objection if we want to skip this PR in favour of that one.

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.

4 participants