fix: INotifyWatcher may raise events with no paths#700
Merged
dfaust merged 4 commits intonotify-rs:mainfrom Jul 16, 2025
Merged
fix: INotifyWatcher may raise events with no paths#700dfaust merged 4 commits intonotify-rs:mainfrom
dfaust merged 4 commits intonotify-rs:mainfrom
Conversation
INotifyWatcher hold inotify watch descriptors map `wd -> path` and after an `unwatch` call the descriptor is deleted from the map. In some cases, if a lot of events are raised, it may cause race condition when the descriptor has been deleted, but event with this descriptor has already been queued. In that case INotifyWatcher doesn't know the path and just ignore the event fixes notify-rs#678
Contributor
Author
|
In this PR I also have moved |
dfaust
reviewed
Jul 16, 2025
Member
|
Thanks, @riberk. This looks very good. I can merge it now, or you can fix the typo first. Your call. |
Co-authored-by: Daniel Faust <[email protected]>
Contributor
Author
Done, thanks for the fix |
Member
|
Fantastic. Thanks again! |
Member
|
@riberk I think this would be a good time to make a new release - unless you are working on something else. |
Contributor
Author
|
@dfaust it'd be good, but I don't know how I can help |
Member
|
I will make the release. Just wanted to make sure I don't release while you are still working on something. I'll wait with the release until my latest MR is merged as well, though. |
Contributor
Author
|
Ah, now I see it. Right now I'm not working on anything |
JohnTitor
pushed a commit
that referenced
this pull request
Jan 16, 2026
* fix: INotifyWatcher may raise events with no paths INotifyWatcher hold inotify watch descriptors map `wd -> path` and after an `unwatch` call the descriptor is deleted from the map. In some cases, if a lot of events are raised, it may cause race condition when the descriptor has been deleted, but event with this descriptor has already been queued. In that case INotifyWatcher doesn't know the path and just ignore the event fixes #678 * chore: changelog for (#700) * fix: typo * fix: typo Co-authored-by: Daniel Faust <[email protected]> --------- Co-authored-by: Daniel Faust <[email protected]>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
INotifyWatcher hold inotify watch descriptors map
wd -> pathand after anunwatchcall the descriptor is deleted from the map. In some cases, if a lot of events are raised, it may cause race condition when the descriptor has been deleted, but event with this descriptor has already been queued. In that case INotifyWatcher doesn't know the path and just ignore the eventfixes #678