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

Anton Kozlov akozlov at openjdk.org
Fri Jun 9 15:51:05 UTC 2023


On Fri, 9 Jun 2023 10:12:56 GMT, Radim Vansa <duke at openjdk.org> wrote:

> Someone already asked for automatic reopening of listening sockets.

It was me :) 

> The policy could then e.g. filter specific ports (similar to files). Yes, you can't to anything but KEEP_CLOSED for sockets related to connection.

Connection-less sockets may be fine as well. Maybe even stream sockets, with a big disclaimer that the policy administrator is fully responsible for breaking communication logic. By default, we should do the most safest thing. 

> I assume that the restore policy will be set during restore, rather than during checkpoint, so there's no chance to handle a non-sense configuration during checkpoint (because the configuration is not present yet).

I think this can be implemented https://github.com/openjdk/crac/pull/69#discussion_r1224461715

> Growing FileDescriptor has a point, any complex implementation for sockets should be hosted next to other Socket related stuff. For files, I don't know if there's a better place, but we could refactor it to an util class.

#79 does that with JDKFIleResource, which provides a limited hard-coded poilcy for files: exceptions are thrown only for files not in classpath.

-------------

PR Review Comment: https://git.openjdk.org/crac/pull/69#discussion_r1224477524


More information about the crac-dev mailing list