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

Change how JPAConfig cleans up its resources #45451

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

marko-bekhta
Copy link
Contributor

fixes #34547

As we discussed in the linked issue, the order in which beans are destroyed is not guaranteed. With this patch, JPAConfig will observe the shutdown event and clean up the resources then.
Since persistent units are now going to be closed prior to datasource being destroyed this should allow Hibernate Search to stop things cleanly.

For the observer priority I've initially used the ObserverMethod.DEFAULT_PRIORITY as the base value but then noticed that it uses the one from the jakarta.interceptor.Interceptor.Priority and thought that:

Start of range for late interceptors defined by extension libraries.

might be the one applicable here 😃

instead of relaying on a Destroyer. This way other components e.g. datasource should still be available.
@quarkus-bot quarkus-bot bot added area/hibernate-orm Hibernate ORM area/hibernate-search Hibernate Search labels Jan 8, 2025
Copy link

quarkus-bot bot commented Jan 8, 2025

/cc @gsmet (hibernate-orm,hibernate-search), @yrodiere (hibernate-orm,hibernate-search)

Copy link

quarkus-bot bot commented Jan 8, 2025

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 620beda.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

Warning

There are other workflow runs running, you probably need to wait for their status before merging.

Copy link

github-actions bot commented Jan 8, 2025

🎊 PR Preview 25e8bfd has been successfully built and deployed to https://quarkus-pr-main-45451-preview.surge.sh/version/main/guides/

  • Images of blog posts older than 3 months are not available.
  • Newsletters older than 3 months are not available.

@gsmet gsmet requested review from yrodiere and mkouba January 8, 2025 17:05
Copy link

quarkus-bot bot commented Jan 8, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 620beda.

Failing Jobs

Status Name Step Failures Logs Raw logs Build scan
Native Tests - Data7 Build Failures Logs Raw logs 🔍

You can consult the Develocity build scans.

Failures

⚙️ Native Tests - Data7 #

- Failing: integration-tests/hibernate-reactive-panache 

📦 integration-tests/hibernate-reactive-panache

Failed to execute goal io.fabric8:docker-maven-plugin:0.45.1:start (docker-start) on project quarkus-integration-test-hibernate-reactive-panache: I/O Error

@mkouba mkouba requested a review from manovotn January 9, 2025 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hibernate-orm Hibernate ORM area/hibernate-search Hibernate Search
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exception on application shutdown with quarkus-hibernate-search-orm-coordination-outbox-polling
1 participant