[crac] RFR: 8350845: [CRaC] Support C/R engines in form of a library [v2]
Radim Vansa
rvansa at openjdk.org
Wed Mar 5 09:14:10 UTC 2025
On Tue, 4 Mar 2025 14:15:42 GMT, Timofei Pushkin <tpushkin at openjdk.org> wrote:
>> test/jdk/jdk/crac/CracEngineOptionsTest.java line 90:
>>
>>> 88: "CRaC engine option: 'keep_running' = 'true'",
>>> 89: "CRaC engine option: 'args' = '-v -v -v -v'",
>>> 90: "CRaC engine option: 'keep_running' = 'false'");
>>
>> I think that providing the same option twice should result in warning, at least.
>
> Not always, for example an engine can interpret `--XX:CRaCEngineOptions=args=--arg1 --XX:CRaCEngineOptions=args=--arg2` as `--XX:CRaCEngineOptions=args="--arg1 --arg2"` (i.e. concatenate all `args` into a single string), so it is up to the engine implementation to issue a warning.
>
> I can implement such warning in crexec but that would require keeping track of whether each option has been set or not (not a problem to implement, just that it'll stay in the configuration even after the parsing is done).
The engine is not interpreting JVM options; engine receives its programmatic configuration and has to deal with that. JVM defines the user API and we can decide that repeated use of the same argument is prohibited (as that would be more likely an user error).
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/207#discussion_r1980990973
More information about the crac-dev
mailing list