-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[release/6.0] Backport FileStream finalization fixes #80439
Merged
carlossanlop
merged 4 commits into
dotnet:release/6.0
from
adamsitnik:backport64997and65899
Jan 11, 2023
Merged
[release/6.0] Backport FileStream finalization fixes #80439
carlossanlop
merged 4 commits into
dotnet:release/6.0
from
adamsitnik:backport64997and65899
Jan 11, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…net#65899) * add missing GC.SuppressFinalize(this) to FileStream.DisposeAsync * DerivedFileStreamStrategy.DisposeAsync does not need to call _fileStream.BaseDisposeAsync, as FileStream.DisposeAsync calls Dispose(false) now
…that they are red
ghost
assigned adamsitnik
Jan 10, 2023
Tagging subscribers to this area: @dotnet/area-system-io |
jeffhandley
approved these changes
Jan 10, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me; thanks, @adamsitnik. We will await Tactics review.
carlossanlop
added
Servicing-approved
Approved for servicing release
and removed
Servicing-consider
Issue for next servicing release review
labels
Jan 11, 2023
ghost
locked as resolved and limited conversation to collaborators
Feb 10, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of #64997 and #65899 to release/6.0
Customer Impact
Multiple users reported performance issues (#78553, #64741) caused by a lack of proper finalization suppression of the file stream buffering strategy. Users who create a lot of
FileStream
instances (with buffering enabled, which is the default and can't not be controlled application-wide with a single flag) and dispose them properly suffer from having plenty of finalizable objects in the finalizer queue. It leads to performance degradation.Testing
Automated tests were added and they are passing. Additional local validation confirmed the leak is gone.
Risk
The risk is low. The fixes "matured" in main and were released as part of .NET 7 (last fix merged 10 months ago) .
fixes #78553