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

Property-driven onRefresh checkpoint during application context bootstrap #30606

Closed
jhoeller opened this issue Jun 6, 2023 · 0 comments
Closed
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@jhoeller
Copy link
Contributor

jhoeller commented Jun 6, 2023

In addition to the flexible CRaC lifecycle integration in #30242, allowing for custom checkpoints, we have identified a common checkpoint option out of the box: in LifecycleProcessor.onRefresh, right before the lifecycle start phase, with all non-lazy beans initialized but no async workers having started yet. No actual stopping and restarting will be necessary at that point yet, in contrast to later checkpoints, making this option attractive for fast bootstrapping (just without any warming up beyond that).

A "spring.context.checkpoint" property with an "onRefresh" value could trigger such a checkpoint automatically. This can easily be used in application-specific build arrangements. The property will only trigger the checkpoint; the inclusion and distribution of the checkpoint image file is up to the individual application then.

@jhoeller jhoeller added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement labels Jun 6, 2023
@jhoeller jhoeller added this to the 6.1.0-M1 milestone Jun 6, 2023
@jhoeller jhoeller self-assigned this Jun 6, 2023
sdeleuze added a commit to sdeleuze/spring-boot-crac-demo that referenced this issue Jun 7, 2023
sdeleuze added a commit to sdeleuze/spring-boot-crac-demo that referenced this issue Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant