From 9150c81d92a4d423f9041f5ee4eba64fc6fb8533 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deleuze?= Date: Mon, 9 Sep 2024 18:43:55 +0200 Subject: [PATCH] Document fixed rate scheduling with CRaC Closes gh-33490 --- .../modules/ROOT/pages/integration/checkpoint-restore.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/framework-docs/modules/ROOT/pages/integration/checkpoint-restore.adoc b/framework-docs/modules/ROOT/pages/integration/checkpoint-restore.adoc index 137e79efeb..934b95b1dc 100644 --- a/framework-docs/modules/ROOT/pages/integration/checkpoint-restore.adoc +++ b/framework-docs/modules/ROOT/pages/integration/checkpoint-restore.adoc @@ -19,6 +19,8 @@ A checkpoint can be created on demand, for example using a command like `jcmd ap WARNING: Leveraging checkpoint/restore of a running application typically requires additional lifecycle management to gracefully stop and start using resources like files or sockets and stop active threads. +WARNING: Be aware that when defining scheduling tasks at a fixed rate, for example with an annotation like `@Scheduled(fixedRate = 5000)`, all missed executions between checkpoint and restore will be performed when the JVM is restored with on-demand checkpoint/restore. If this is not the behavior you want, it is recommended to schedule tasks at a fixed delay (for example with `@Scheduled(fixedDelay = 5000)`) or with a cron expression as those are calculated after every task execution. + NOTE: If the checkpoint is created on a warmed-up JVM, the restored JVM will be equally warmed-up, allowing potentially peak performance immediately. This method typically requires access to remote services, and thus requires some level of platform integration. == Automatic checkpoint/restore at startup