-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
Compatibility with JVM checkpoint restore (OpenJDK's Project CRaC) #29921
Comments
I've been testing For the tests I've put together a generic CRaCAdapter - autoconfiguration, that internally leverages the Then I've tried the
|
Thanks, @tzolov , for the descriptive comment. It's quite comprehensive and useful when perused. |
This commit: - Refine the wording used in logs - Avoid calling awaitPreventShutdownBarrier() in afterRestore() - Add logs to print the restart duration See spring-projectsgh-29921
This commit: - Refine the wording used in logs and Javadoc - Avoid calling awaitPreventShutdownBarrier() in afterRestore() - Add logs to print the restart duration See spring-projectsgh-29921
Project CRaC introduces a mechanism for taking a JVM checkpoint snapshot (typically after startup) and then restoring from that checkpoint image for further deployment purposes, reducing the startup time.
Spring Boot on Tomcat is a target scenario for CRaC already. Spring applications are natural candidates for checkpoints after startup (plus some warming up through initial requests).
A couple of specific requirements need to be addressed: in particular the closing of file handles and network connections at checkpoint time plus subsequent restoring of those handles, as well as the refreshing of cached host metadata in a restored JVM. CRaC provides a Resource API for registering corresponding
beforeCheckpoint
/afterRestore
callbacks.From the Spring Framework side, we intend to revisit our
Lifecycle
contract where the existing stop/start mechanism implies the suspension of application-internal async processing and messaging resources already. We could narrow those semantics so that stop/start becomes a good citizen in a checkpoint/restore scenario, implying CRaC-compatible handling of resources in Spring-managed beans. This can then be triggered through a singleConfigurableApplicationContext.stop/start
call which propagates to all contained beans, e.g. as part of a central CRaC Resource adapter in Spring Boot.The text was updated successfully, but these errors were encountered: