[crac] RFR: Support updating MANAGEABLE JVM options during restore

Radim Vansa duke at openjdk.org
Wed May 3 09:47:44 UTC 2023


On Fri, 28 Apr 2023 07:24:06 GMT, Radim Vansa <duke at openjdk.org> wrote:

> When a JVM option is MANAGEABLE it can be set at any time during runtime, therefore it is safe to change it during the restore operation. Rather than silently ignoring JVM options passed along with -XX:CRaCRestoreFrom we send them to the restored process and either update or print a warning if given option cannot be changed.

@AntonKozlov Created a separate bit (RESTORE_SETTABLE - adjective as the others), and using non-settable flags fails early. I've also tried to prohibit explicitly setting `-cp` and friends but in the `parse_options_for_restore` I already cannot tell where this comes from so I have not incorporated this in this PR.
There's a few extra changes in `CracBuilder` that would help with testing ^ but I find them useful in general, so I've included those.

-------------

PR Comment: https://git.openjdk.org/crac/pull/61#issuecomment-1532735769


More information about the crac-dev mailing list