spring-projects / spring-projects/spring-boot

Review asynchronous EntityManagerFactory bootstrapping and DataSource initialisation

Open
#14,658 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: blocked type: task
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.