[crac] RFR: Provide arguments for restore [v5]
Anton Kozlov
akozlov at openjdk.java.net
Thu Mar 24 14:56:19 UTC 2022
On Tue, 22 Mar 2022 18:06:18 GMT, Ashutosh Mehra <duke at openjdk.java.net> wrote:
> the first invocation of the application would create the checkpoint, and for subsequent invocation, JVM would restore the process from the checkpoint.
I don't want to give too much control to JVM (and take the control from the user). Not every program is sensible to restart. Now we always restore to the point of checkpoint. Defining it elsewhere (e.g. start of the app) is hard problem.
> Can you share some scenarios where the application would benefit from this feature. While the javac example shows how this approach would work, in my opinion, it doesn't fall into the category of "influence the program behavior on restore" because the javac has already completed its original task when the checkpoint is taken.
Here the example program is a loop over javac, not a pure javac. The current example exits right after restore https://github.com/openjdk/crac/pull/16/files#diff-4d20e6a15e5a09de1e430f18a7c84eb257eb3d2b98721a35f4853d3fd2dadf37R27, but with arguments we arrange another javac iteration before the exit.
I can imagine that a micro-service may need to know coordinates of other services on restore. Command line arguments may be used to provide the path to a config file then.
In general, I would like arguments on restore to be as powerful as arguments for normal java start, to parameterize program as necessary.
-------------
PR: https://git.openjdk.java.net/crac/pull/16
More information about the crac-dev
mailing list