[crac] RFR: Handle open file descriptors with configurable policies [v9]
Radim Vansa
rvansa at openjdk.org
Tue Jul 4 09:06:25 UTC 2023
On Mon, 3 Jul 2023 14:52:36 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:
>> Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Cosmetic fixes (imports)
>
> src/java.base/share/classes/java/io/FileOutputStream.java line 489:
>
>> 487: }
>> 488: // FileOutputStream writes only forward, so it makes sense to reopen it appending
>> 489: open(path, true);
>
> This should be done depending on the initial mode, and in the non-appending mode, we should also store and restore the position (e.g `getChannel.position()`).
This does not work; when creating the FileChannel (lazy) as an attempt to read the position I would create another JDKFileResource, and try to register it => this would get blocked as we're already in the FDs priority.
I could probably add in some exceptions to not create it on this codepath, but is it really worth it? I thought that the idea was to work we already have in the resource. And there's no difference in behaviour unless someone appends to that file during checkpoint.
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/69#discussion_r1251730320
More information about the crac-dev
mailing list