You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR slightly overhauls the NewWatcher() API so that a list of
Options functions can be provided. Currently there is only one
configured option but there are a few issues asking for more
configuration options so this should allow for an extensible method to
add configuration options to NewWatcher.
The goals for this PR:
1. Do not change the API in any way that would require any refactor by
users of the library.
2. Make all options optional and ensure default behavior is unchanged.
3. Provide the option to configure a userland buffer in the event
channel.
The motivation for this PR:
We make extensive use of the fsnotify library but continually run into
situations with older RedHat installations where the kernel fsnotify
buffer is not large enough to accommodate high load scenarios like log
file rotation and the end user cannot modify the kernel parameters. We
have been running a fork that created a userland event channel buffer
and found that we are able to deal with very large bursts of fsnotify
events without being forced to catch errors and recover.
The userland channel buffer will never be as fast as the kernel buffer,
and in most cases straight won't be used, but this PR gives users of the
library the option to add some padding without changing kernel
parameters.
---------
Co-authored-by: kris <kris.watts@gravwell.io>
0 commit comments