-
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/7.0] TarReader should dispose underlying stream if leaveOpen is false #80598
Conversation
…#79920) * Dispose underlying stream in TarReader.DisposeAsync() as well Same as dotnet#79899 * Consolidate duplicated WrappedStream test helpers to Common sources * Dispose stream passed to WrappedStream
* Dispose archive stream after the list of DataStreams * Add tests for TarReader.DisposeAsync properly disposing underlying stream
Tagging subscribers to this area: @dotnet/area-system-io Issue DetailsBackport of #79899, #79920, and #80572 to release/7.0 DetailsWe are not disposing the stream that is wrapped by TarReader even when specifically asked to dispose it with leaveOpen:false. Customer ImpactThis has a customer impact of potentially leaking resources without the user noticing it. as it manifested in our CI, #77012 shows how temporary files were piling up and out-of-disk-space errors happened due to the underlying FileStreams not being properly disposed. TestingUnit tests were added to verify that the underlying stream is properly disposed when the TarReader is disposed syncronously and asynchronously. RiskLow.
|
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.
LGTM
CI failures are timeout cancellations in browser (unrelated to this change). |
Approved by Tactics via email (7.0.3). |
Backport of #79899, #79920, and #80572 to release/7.0
Details
We are not disposing the stream that is wrapped by TarReader even when specifically asked to dispose it with leaveOpen:false.
Customer Impact
This has a customer impact of potentially leaking resources without the user noticing it. as it manifested in our CI, #77012 shows how temporary files were piling up and out-of-disk-space errors happened due to the underlying FileStreams not being properly disposed.
Testing
Unit tests were added to verify that the underlying stream is properly disposed when the TarReader is disposed syncronously and asynchronously.
Risk
Low.