[crac] RFR: Handle open file descriptors with configurable policies [v8]
Radim Vansa
rvansa at openjdk.org
Thu Jun 29 15:54:47 UTC 2023
> When the application does not close some file descriptors through Resources we can use `jdk.crac.file-policy.checkpoint`, `jdk.crac.file-policy.restore`, `jdk.crac.socket-policy.checkpoint` and `jdk.crac.socket-policy.checkpoint` to configure the behaviour.
>
> These properties can specify a list of semicolon-separated key=value pairs, where the key can be one of:
>
> * numeric file descriptor
> * for `file-policy`, path using 'glob' pattern matching (see FileSystem.getPathMatcher() for details) - this matches named pipes, too
> * for `file-policy` keyword `FIFO` matching all pipes (including anonymous)
> * for `socket-policy` a `<local>,<remote>` pair, with the `<remote>` part being optional. Both `<local>` and `<remote>` can be unix socket path, IPv4/IPv6 address with optional colon and port number or wildcard `*` replacing any of those parts.
>
> The possible values are in OpenFilePolicies.BeforeCheckpoint, OpenFilePolicies.AfterRestore, OpenSocketPolicies.BeforeCheckpoint and OpenSocketPolicies.AfterRestore enums.
Radim Vansa has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 12 commits:
- Merge remote-tracking branch 'origin/crac' into newfd-policies
- Another rework, without native methods
- Don't use numeric FDs, remote _AT_END policies
- cleanup
- Merge branch 'crac' into newfd-policies
- 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>
- ... and 2 more: https://git.openjdk.org/crac/compare/a9f87061...a0075b13
-------------
Changes: https://git.openjdk.org/crac/pull/69/files
Webrev: https://webrevs.openjdk.org/?repo=crac&pr=69&range=07
Stats: 2156 lines in 50 files changed: 2031 ins; 53 del; 72 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