Skip to content
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

Consider switching to Apache Commons IO Monitor instead of using the NIO2 WatchService #71

Open
kristian opened this issue Sep 13, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@kristian
Copy link
Contributor

Currently using the NIO2 WatchService in Java turned out to be a huge pain, due to the JVM internal implementation approach. We never achieved to have a consistent behaviour across all operating systems, which e.g. led to us having to disable all WatchVerticle related tests in our containerized build on GitHub (see [1] explaining why).

After consultation with @gedack he raised the idea of switching to Apache Commons IO Monitor as an alternative to use WatchService. It shall be clarified in a PoC whether that is a more viable approach.

[1] https://blog.arkey.fr/2019/09/13/watchservice-and-bind-mount/

@kristian kristian added the enhancement New feature or request label Sep 13, 2021
@kristian
Copy link
Contributor Author

@s4heid
Copy link
Contributor

s4heid commented Oct 24, 2022

The WatchService is biting us again, when building a dockerimage on M1 chips.

16:15:41.253 [vert.x-eventloop-thread-0] {noCorrelationIdAvailable} ERROR io.neonbee.internal.deploy.PendingDeployment - Deployment of Verticle(io.neonbee.internal.verticle.ModelRefreshVerticle) failed
java.io.IOException: Function not implemented
	at java.base/sun.nio.fs.LinuxWatchService.<init>(LinuxWatchService.java:64)
	at java.base/sun.nio.fs.LinuxFileSystem.newWatchService(LinuxFileSystem.java:47)
	at io.neonbee.internal.verticle.WatchVerticle.start(WatchVerticle.java:167)
	at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$5(DeploymentManager.java:196)
	at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:264)
	at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:246)
	at io.vertx.core.impl.EventLoopContext.lambda$runOnContext$0(EventLoopContext.java:43)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:829)

Related: docker/for-mac#6174

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants