-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Exception on application shutdown with quarkus-hibernate-search-orm-coordination-outbox-polling #34547
Comments
/cc @gsmet (hibernate-search) |
Hey @yrodiere We are adding an injection point: Lines 146 to 160 in 66429bd
and based on the comment, we expect that the To check this assumption, I've created two simple app-scoped beans (that is if my understanding was correct): @ApplicationScoped
public class MyService1 {
@Inject
MyService2 service2;
public String string() {
return service2.string();
}
@PreDestroy
public void destroy() {
System.err.println("===========" + this.getClass().getName() + " destroy");
}
} @ApplicationScoped
public class MyService2 {
public String string() {
return "string2";
}
@PreDestroy
public void destroy() {
System.err.println("===========" + this.getClass().getName() + " destroy");
}
} and from time to time, I see that here, where the beans are destroyed (in the case of the Lines 89 to 104 in 66429bd
we get a set of beans to destroy, and if we are "unlucky",
Neither |
Thanks for looking into this @marko-bekhta .
@mkouba @Ladicek can you confirm that Arc beans are closed in an order that is consistent with the dependency graph -- at least when there is no cycle? FWIW, if closing order is not guaranteed, other issue may have the same root cause; see for example #36265 (comment) |
There is no order in which beans are destroyed, and I believe there is no way to affect that. I think @mkouba mentioned this several times: |
Thanks @Ladicek |
Thanks.
@marko-bekhta I'm currently making changes in this area in #41929 ; see in particular https://github.com/quarkusio/quarkus/pull/41929/files#diff-ae22f0b05b345fab3d41e46504afedf53b79b6b3b4a12411bde2c8ae60c2c234L445-L453 and https://github.com/quarkusio/quarkus/pull/41929/files#diff-bc8502db2a346fd80de961c88ff8274ddfa740cdc9b462d33021d25cce7c452eR292. You may want to wait until I'm done before you work on this? I'll probably be less likely to lead to conflicts. Can't promise when I'll be done though :/
So I guess we could keep the existing For #36265 we basically want Agroal to shut down after Vertx... that probably means the Vertx extension needs to use |
yeah, sure, I can wait 😃 no worries. |
Correct. For |
Describe the bug
When using the extension
quarkus-hibernate-search-orm-coordination-outbox-polling
and stopping the application in dev mode, exception gets thrown, caused by Hibernate Search not being able to create a connection to the database (it needs to in order to re-register agents).Expected behavior
No exception.
Actual behavior
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
We should probably shut down Agroal after Hibernate ORM to avoid this exception.
The text was updated successfully, but these errors were encountered: