Skip to content

Make PhysicalFileProvider polling more resilient to IO exceptions - #72462

Merged
jozkee merged 1 commit into
dotnet:mainfrom
jozkee:fileprovider-71003
Jul 19, 2022
Merged

Make PhysicalFileProvider polling more resilient to IO exceptions#72462
jozkee merged 1 commit into
dotnet:mainfrom
jozkee:fileprovider-71003

Conversation

@jozkee

Copy link
Copy Markdown
Member

Fixes#71003
Fixes#56810

@jozkeejozkee added this to the 7.0.0 milestone Jul 19, 2022
@jozkeejozkee self-assigned this Jul 19, 2022
@ghost

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/area-extensions-filesystem
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #71003
Fixes #56810

Author:Jozkee
Assignees:Jozkee
Labels:

area-Extensions-FileSystem

Milestone:7.0.0

@danmoseleydanmoseley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we catch any exception that could be IO related? Or is the API we are calling only going to throw these two?

Reasoning: the app has little or no control over whether examining arbitrary files on disk leads to an IO exception. It could be a corrupted disk, for a start. The app can't filter these out and can't catch them - it will just terminate. Is that a better experience than catching them?

If we catch all IO exceptions, you can use this as a guide:
https://github.com/dotnet/msbuild/blob/c34eb484f1ddf0f9e1940c620b1eff169433f5a1/src/Shared/ExceptionHandling.cs#L130-L145

@jozkee

Copy link
Copy Markdown
MemberAuthor

I'm certain the API won't throw these ones:

eisNotSupportedException||(eisArgumentException&&!(eisArgumentNullException))||eis SecurityException

All exceptions come form Win32Marshal.GetExceptionForWin32Error. which can return Unauthorized, several exceptions derived from IOException, and OperationCanceledException, which I don't think happens for this case.
https://source.dot.net/#System.Private.CoreLib/Win32Marshal.cs,8cf456a56c1e487e

@danmoseley

Copy link
Copy Markdown
Contributor

sounds good to me.

@jozkee

Copy link
Copy Markdown
MemberAuthor

One CI error is #70969, the other one is System.Net.Http test failures (couldn't find a related issue).

@jozkee
jozkee merged commit a54a823 into dotnet:mainJul 19, 2022
@jozkee
jozkee deleted the fileprovider-71003 branch July 19, 2022 18:33
@ghostghost locked as resolved and limited conversation to collaborators Aug 18, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

2 participants

@jozkee@danmoseley