-
-
Notifications
You must be signed in to change notification settings - Fork 962
Make BufferedWatcher buffered again #657
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
|
@bboreham thanks for the PR - I'm investigating a similar issue (deadlock on windows) - I have it not yet pinned down but it might be because of fsnotify, too. However, when testing out your changes I didn't see any behavior changes. As I'm not sure yet if it's really fsnotify in our case, take my words with a grain of salt.
Lines 251 to 253 in a9bc2e0
In non-windows systems (E.g. inotify), Lines 173 to 175 in a9bc2e0
In windows systems however, it calls Lines 38 to 40 in a9bc2e0
So in the case of windows, when calling So IMO the creation of the What is your take on this? |
|
It seems to me you are proposing a change to the design and/or API. I didn't spend enough time on this to make such judgements. I was reporting #656, and found a workaround which was defeated by this simpler problem. However in the project where fsnotify is used, we pinned to the older version 1.7. |
|
@bboreham maybe it wasn't clear what my intention was then:
This is because the creation of the Therefore, this fix here is valid for users using |
Agreed. I did not claim this PR fixes any issue, especially not #656. |
44f0fa0 to
32b1aa5
Compare
The size parameter didn't actually get passed to the make() call; regression from fsnotify#632. Also make sure the default buffer size is 50 on Windows again. There is no need for a separate newBackend() and newBufferedBackend() in the first place, as the buffer size just controls the channel buffer size which is now done in the generic fsnotify.go, so refactor to remove that. Signed-off-by: Bryan Boreham <[email protected]>
|
Thanks; I updated the PR to also a buffer size of 50 by default like before, and added a test for the lot. |
…tea#7473) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify) | require | minor | `v1.8.0` -> `v1.9.0` | --- ### Release Notes <details> <summary>fsnotify/fsnotify (github.com/fsnotify/fsnotify)</summary> ### [`v1.9.0`](https://github.com/fsnotify/fsnotify/releases/tag/v1.9.0) [Compare Source](fsnotify/fsnotify@v1.8.0...v1.9.0) ##### Changes and fixes - all: make BufferedWatcher buffered again ([#&go-gitea#8203;657]) - inotify: fix race when adding/removing watches while a watched path is being deleted ([#&go-gitea#8203;678], [#&go-gitea#8203;686]) - inotify: don't send empty event if a watched path is unmounted ([#&go-gitea#8203;655]) - inotify: don't register duplicate watches when watching both a symlink and its target; previously that would get "half-added" and removing the second would panic ([#&go-gitea#8203;679]) - kqueue: fix watching relative symlinks ([#&go-gitea#8203;681]) - kqueue: correctly mark pre-existing entries when watching a link to a dir on kqueue ([#&go-gitea#8203;682]) - illumos: don't send error if changed file is deleted while processing the event ([#&go-gitea#8203;678]) [#&go-gitea#8203;657]: fsnotify/fsnotify#657 [#&go-gitea#8203;678]: fsnotify/fsnotify#678 [#&go-gitea#8203;686]: fsnotify/fsnotify#686 [#&go-gitea#8203;655]: fsnotify/fsnotify#655 [#&go-gitea#8203;681]: fsnotify/fsnotify#681 [#&go-gitea#8203;679]: fsnotify/fsnotify#679 [#&go-gitea#8203;682]: fsnotify/fsnotify#682 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "* 0-3 * * *" (UTC), Automerge - "* 0-3 * * *" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMjIuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIyMi4xIiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=--> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7473 Reviewed-by: Earl Warren <[email protected]> Co-authored-by: Renovate Bot <[email protected]> Co-committed-by: Renovate Bot <[email protected]>
This detail got lost in #632.