Skip to content

add accessor for whether rescan is required on Event #435

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

Merged
merged 1 commit into from
Aug 17, 2022

Conversation

trinity-1686a
Copy link
Contributor

this is a low-effort/no-breakage solution to #434

@0xpr03 0xpr03 merged commit 1fbf8fa into notify-rs:main Aug 17, 2022
@0xpr03
Copy link
Member

0xpr03 commented Aug 17, 2022

thanks!

@trinity-1686a trinity-1686a deleted the need-rescan branch August 17, 2022 18:42
bgw added a commit to vercel/next.js that referenced this pull request Apr 18, 2025
The notify crate requires handling rescan events with the event queue overflows.

Context on this issue in the notify crate:
- notify-rs/notify#412
- notify-rs/notify#434
- notify-rs/notify#435

In our case, that means we should invalidate every file we've read in `turbo-tasks-fs`.

We should also attempt to re-add filesystem watchers for every path, since some of those paths could've been removed and re-added.

Tested this on Linux by lowering the inotify queue to something tiny to trigger frequent rescan events:

```
echo 3 | sudo tee /proc/sys/fs/inotify/max_queued_events
rm -rf /tmp/fuzz && RUST_BACKTRACE=1 cargo run -p turbo-tasks-fuzz -- fs-watcher --fs-root /tmp/fuzz --notify-timeout-ms 100 --directory-modifications 0
echo 16384 | sudo tee /proc/sys/fs/inotify/max_queued_events  # restore back to default
```

As a sanity check, I also tried running the fuzzer on macos, though it doesn't seem like there's as easy of a way to trigger rescan events on that platform (?).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants