spring-projects / spring-projects/spring-boot
Review asynchronous EntityManagerFactory bootstrapping and DataSource initialisation
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 81.5k
- Forks
- 42.7k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 65
Description
When the EntityManagerFactory is bootstrapped asynchronously, the DataSourceSchemaCreatedEvent is published off the main thread. This means that any data scripts will be applied off the main thread as well. I think a consequence of this is that the application context may have completed refreshing before the DataSource is fully initialised. I think we need to confirm if this is the case and then decide if the behaviour is acceptable.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace asynchronous EntityManagerFactory bootstrapping, DataSourceSchemaCreatedEvent publication, and application-context refresh ordering. Confirm whether data scripts can run off the main thread after the context has refreshed, then establish whether that initialization behavior is acceptable and document the resulting decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100