[crac] RFR: Handle open file descriptors with configurable policies [v4]
Radim Vansa
duke at openjdk.org
Mon Jun 12 15:04:47 UTC 2023
> When the application does not close some file descriptors through Resources we can use `jdk.crac.fd-policy.checkpoint` and `jdk.crac.fd-policy.restore` to configure the behaviour.
>
> These properties can specify a list of File.pathSeparator-separated key=value pairs, where the key can be one of:
>
> * numeric file descriptor
> * path using 'glob' pattern matching (see FileSystem.getPathMatcher() for details)
> * keywords FIFO and SOCKET that match pipes and sockets
>
> The value should match one of possible values from OpenFDPolicies.BeforeCheckpoint and OpenFDPolicies.AfterRestore
Radim Vansa has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains seven commits:
- Refactor FileDescriptor resource to separate class
- Add REOPEN_AT_END and OPEN_OTHER_AT_END policies
- Merge branch 'crac' into newfd-policies
- Effectively revert previous commit: Initialize logger in <clinit>
- Simplify workarounds in SimpleConsoleLogger.<clinit>
- Merge branch 'crac' into newfd-policies
- Handle open file descriptors with configurable policies
When the application does not close some file descriptors through
Resources we can use `jdk.crac.fd-policy.checkpoint` and
`jdk.crac.fd-policy.restore` to configure the behaviour.
These properties can specify a list of File.pathSeparator-separated
key=value pairs, where the key can be one of:
* numeric file descriptor
* path using 'glob' pattern matching (see FileSystem.getPathMatcher()
for details)
* keywords FIFO and SOCKET that match pipes and sockets
The value should match one of possible values from
OpenFDPolicies.BeforeCheckpoint and OpenFDPolicies.AfterRestore
-------------
Changes: https://git.openjdk.org/crac/pull/69/files
Webrev: https://webrevs.openjdk.org/?repo=crac&pr=69&range=03
Stats: 1296 lines in 16 files changed: 1221 ins; 69 del; 6 mod
Patch: https://git.openjdk.org/crac/pull/69.diff
Fetch: git fetch https://git.openjdk.org/crac.git pull/69/head:pull/69
PR: https://git.openjdk.org/crac/pull/69
More information about the crac-dev
mailing list