[crac] RFR: Handle open file descriptors with configurable policies [v2]

Radim Vansa duke at openjdk.org
Fri May 12 13:15:26 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 incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:

 - 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:
  - all: https://git.openjdk.org/crac/pull/69/files
  - new: https://git.openjdk.org/crac/pull/69/files/be29c783..37cc0ac4

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=crac&pr=69&range=01
 - incr: https://webrevs.openjdk.org/?repo=crac&pr=69&range=00-01

  Stats: 30 lines in 6 files changed: 17 ins; 6 del; 7 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