-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Avoid crashing in PollingFileWatcher #21544
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
Conversation
// If the directory is deleted after the exists check this will throw and could crash the process | ||
catch (DirectoryNotFoundException) | ||
{ | ||
return; |
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.
Do you think the ForeachEntityInDirectory
needs a similar treatment vis-a-vis files being deleted?
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.
? This is in ForeachEntityInDirectory
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.
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.
I don't think so? It has a catch for FileNotFoundException
and is using the already resolved FileSystemInfo
object, so should be pretty safe.
👀 |
There are 12 quarantined |
I know I put some of them in quarantine when I enabled them to run on Helix. It's probably time for some of them to leave. I do see that there are a couple semi recent failures, but they don't look related. |
There is a race we haven't observed before where the test could finish and cleanup the temporary files it creates but the PollingFileWatcher is in the middle of scanning for changes.
This change will observe the exception and just not look at that directory during the current poll.