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

Restarts in DevMode generate a warning about multiple Vertx instance #4720

Closed
machi1990 opened this issue Oct 21, 2019 · 7 comments
Closed
Labels
area/vertx kind/bug Something isn't working
Milestone

Comments

@machi1990
Copy link
Member

Describe the bug
In dev mode, we have this warning

WARNING [io.ver.cor.imp.VertxImpl] (vert.x-worker-thread-1) You're already on a Vert.x context, are you sure you want to create a new Vertx instance

Expected behavior
No warning message

Actual behavior
The warning message is logged on each restart

2019-10-21 14:41:34,882 INFO  [io.quarkus] (main) Quarkus 999-SNAPSHOT started in 1.158s. Listening on: http://0.0.0.0:8080
2019-10-21 14:41:34,882 INFO  [io.quarkus] (main) Profile dev activated. Live Coding activated.
2019-10-21 14:41:34,882 INFO  [io.quarkus] (main) Installed features: [cdi, resteasy, smallrye-context-propagation, smallrye-reactive-streams-operators, vertx]
2019-10-21 14:41:57,488 INFO  [io.qua.dev] (vert.x-worker-thread-0) File change detected: /tmp/foo/src/main/resources/application.properties
2019-10-21 14:41:57,532 INFO  [io.quarkus] (vert.x-worker-thread-0) Quarkus stopped in 0.043s
2019-10-21 14:41:57,533 INFO  [io.qua.dep.QuarkusAugmentor] (vert.x-worker-thread-0) Beginning quarkus augmentation
2019-10-21 14:41:57,656 INFO  [io.qua.resteasy] (build-3) Resteasy running without servlet container.
2019-10-21 14:41:57,656 INFO  [io.qua.resteasy] (build-3) - Add quarkus-undertow to run Resteasy within a servlet container
2019-10-21 14:41:57,683 INFO  [io.qua.dep.QuarkusAugmentor] (vert.x-worker-thread-0) Quarkus augmentation completed in 150ms
2019-10-21 14:41:57,720 WARNING [io.ver.cor.imp.VertxImpl] (vert.x-worker-thread-0) You're already on a Vert.x context, are you sure you want to create a new Vertx instance?
2019-10-21 14:41:57,724 INFO  [io.quarkus] (vert.x-worker-thread-0) Quarkus 999-SNAPSHOT started in 0.192s. Listening on: http://0.0.0.0:8080
2019-10-21 14:41:57,724 INFO  [io.quarkus] (vert.x-worker-thread-0) Profile dev activated. Live Coding activated.
2019-10-21 14:41:57,724 INFO  [io.quarkus] (vert.x-worker-thread-0) Installed features: [cdi, resteasy, smallrye-context-propagation, smallrye-reactive-streams-operators, vertx]
2019-10-21 14:41:57,724 INFO  [io.qua.dev] (vert.x-worker-thread-0) Hot replace total time: 0.239s

To Reproduce
Steps to reproduce the behavior:

  1. start Quarkus in dev mode
  2. trigger a restart by modifying a file
  3. observe the console

Environment (please complete the following information):

  • Quarkus version or git rev: 0.25.0
@machi1990 machi1990 added kind/bug Something isn't working area/vertx labels Oct 21, 2019
@gsmet gsmet added this to the 0.27.0 milestone Oct 22, 2019
@gsmet
Copy link
Member

gsmet commented Oct 22, 2019

I suppose we could add a log filter cleanup rule but I'm not sure it would be the right fix. @stuartwdouglas what's your take on that one?

@machi1990
Copy link
Member Author

I was thinking of doing it only for DevMode. I was not sure if filtering is the way to go.

@gsmet
Copy link
Member

gsmet commented Oct 22, 2019

I think it's last resort and a proper fix would be better.

I forgot about this otherwise I would have pushed a workaround in 0.26.0. There's a good chance people will complain about this.

@machi1990
Copy link
Member Author

Do you want me to prepare a draft PR for the log filtering?

@stuartwdouglas
Copy link
Member

It sounds like this can be closed now?

@machi1990
Copy link
Member Author

@stuartwdouglas Hi, the log filtering is a workaround only applied in dev mode till we have a proper solution of having only one Vertx instance. I'll leave the issue open. WDYT?

@stuartwdouglas
Copy link
Member

#4367 is the issue to track removal of the 2nd vert.x instance, this one was just the log message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/vertx kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants