-
Notifications
You must be signed in to change notification settings - Fork 0
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
attempt at fix dungbeetle alert #213
Conversation
I think there may still be an unhandled race condition, albeit we've decreased the cross-section for this happening -
Should we do something more generic? If we wrap everything starting here: Is this overkill, have we seen any other edge cases? |
I agree that all I did was lower the cross section of alerts (I probably should have write this out to save you some time analyzing), and, in principle, this sequence of events causing an error you describe could happen. My reasoning for sufficiency was that when I do go through slack, the getsize has been the source of all the errors, and none from getctime, so the sequence of events hasn't happened yet. I think using some sort of wrapper is the better way to do this. I'd rather put this into a separate issue/ future upgrade. Otherwise nothing we do can really be 100% safe. Eg. you could do your If you see a good reason why you think my change would increase errors from getctime, let me know. I don't think so, but we could add a quick Edit: Hmmm now I want to think about your proposed solution some more. |
@wcpettus I am confused by this statement: I do think what you suggest is easy and thorough, however |
Yes, option 1 that you suggest (we just need to wrap the next two lines (51/52) in a try?) I think it has the further advantage that the except OSError that you put there could supersede the try/except of lines 40/43. I think it could be extended to have an if |
Right now untested. The errors seem to suggest that this is totally coming from the
getsize()
call which only happens here. When it acts on a file that does not exist, it throws this error.This should be fixed by this change, as
isfile(x)
is not logically the same asnot isdir(x)
. While they are the same statements if I put x = filename or directory name (true, false respectively), when the file does not exist, the statements are not the same. We now check explicitly that this is a real fileResolves #212