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

Anton Kozlov akozlov at openjdk.org
Fri Jun 9 15:25:16 UTC 2023

On Fri, 9 Jun 2023 09:55:06 GMT, Radim Vansa <duke at openjdk.org> wrote:

>> src/java.base/share/classes/java/io/FileDescriptor.java line 456:
>>> 454:             // this is used probably as the file moved on the filesystem but the contents
>>> 455:             // are the same.
>>> 456:             if (!reopen(resource.originalFd, path, resource.originalFlags, resource.originalOffset)) {
>> Another option is a log file in the append mode, which may grow larger -- in that case we'd like to have that in append mode with position at the end. Probably that is handled by setting proper flags, but at least this would contradict with the comment.
> This handling is meant for read-only access, too.
> I don't think that the concept of 'appending' makes sense from CRaC POV - the append flag just says whether you've started at the beginning or at the end; but this aims at transparent continuation of what you were doing as if no checkpoint happened.

I don't completely follow. Consider an example of a log file in append write mode (every write guaranteed to append to file, even with concurrent writes). As for me, it's perfectly fine to restore with that log, even with different offset, since offset does not make a lot of sense with append mode.


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

More information about the crac-dev mailing list