[crac] RFR: Handle open file descriptors with configurable policies [v3]
Radim Vansa
duke at openjdk.org
Fri Jun 9 10:04:09 UTC 2023
On Thu, 8 Jun 2023 18:12:15 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:
>> Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Effectively revert previous commit: Initialize logger in <clinit>
>
> src/java.base/share/classes/jdk/crac/impl/OpenFDPolicies.java line 23:
>
>> 21: public class OpenFDPolicies<P> {
>> 22: public static final String CHECKPOINT_PROPERTY = "jdk.crac.fd-policy.checkpoint";
>> 23: public static final String RESTORE_PROPERTY = "jdk.crac.fd-policy.restore";
>
> Having separated policies for checkpoint and restore enables some weird configuration, when e.g. checkpoint specifing CLOSE and restore -- REOPEN. It would be better to have a combined, consisted checkpoint-restore policy that specifes both parts at once.
I've started with a single policy enum but it turned out the inlined cross product of behaviours was rather a long and repetitive.
In fact CLOSE + REOPEN is the combination that makes a perfect sense. You close the file on checkpoint (rather than error out and fail the checkpoint) and then you reopen the same file (rather than opening something else).
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/69#discussion_r1224113433
More information about the crac-dev
mailing list