[crac] RFR: 8365241: [CRaC] Ignore new arguments when CRaCIgnoreRestoreIfUnavailable is true
Timofei Pushkin
tpushkin at openjdk.org
Mon Aug 11 14:56:27 UTC 2025
On Mon, 11 Aug 2025 14:39:01 GMT, Radim Vansa <rvansa at openjdk.org> wrote:
>> Arguments are not passed to the restored process when `-XX:+CRaCIgnoreRestoreIfUnavailable` is set on restore. The check is performed on the side of the restoring VM since in the restored VM `CRaCIgnoreRestoreIfUnavailable` could have been set before the current restore.
>>
>> Documentation for the new arguments feature and `CRaCIgnoreRestoreIfUnavailable` is also added, explaining this behavior.
>
> src/java.base/share/man/java.md line 1099:
>
>> 1097: instead of failing.
>> 1098:
>> 1099: When restoring with this option, you should specify a main class and its
>
>> you **should** specify a main class
>
> I guess we shall make this mandatory -> you **must** sepecify a main class? Do we have a test for the case when you run plain `java -XX:CRaCRestoreFrom=... -XX:+CRaCIgnoreRestoreIfUnavailable` and the image is not present?
No, there is no such test currently.
You do not always have to specify a main class since if the image exists the main won't be used. Initially I wrote "you are expected to specify" and made it shorter into this version.
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/261#discussion_r2267037373
More information about the crac-dev
mailing list