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

Keep parameter values out IMemoryCache in RelationalCommandCache #34803

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yinzara
Copy link
Contributor

@yinzara yinzara commented Oct 1, 2024

Only store necessary info for parameter values RelationalCommandCacheKey to prevent memory leaks.

This a relatively serious memory leak defect and needs to be ported back to the release/8.0 branch as well.

Fixes #34028

  • I've read the guidelines for contributing and seen the walkthrough
  • I've posted a comment on an issue with a detailed description of how I am planning to contribute and got approval from a member of the team
  • The code builds and tests pass locally (also verified by our automated build checks)
  • Commit messages follow this format:
        Summary of the changes
        - Detail 1
        - Detail 2

        Fixes #bugnumber
  • Tests for the changes have been added (for bug fixes / features)
  • Code follows the same patterns and style as existing code in this repo

Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

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

Thanks @yinzara, this looks like a good fix - see minor comments below.

@yinzara yinzara force-pushed the bugfix/34028 branch 4 times, most recently from bc4f507 to 201dfe2 Compare October 3, 2024 23:11
@yinzara
Copy link
Contributor Author

yinzara commented Oct 3, 2024

All done now. Sorry about all the force pushes :)

Store only nullness and array lengths in struct form to prevent parameters memory leaks

Fixes dotnet#34028
@yinzara
Copy link
Contributor Author

yinzara commented Oct 4, 2024

All requested modifications have been complete. All checks have passed. Ready for merge when you are.

I know that this defect has technically existed for many prior versions of .NET.

Do we still port defects to the release/6.0 branch or is that branch now completely unmaintained?

Can I help in doing that or is this something only you guys do?

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.

User parameter data is referenced inside RelationalCommandCache
3 participants