[crac] RFR: Correct System.nanotime() value after restore [v3]
Anton Kozlov
akozlov at openjdk.org
Thu Apr 13 15:31:49 UTC 2023
On Thu, 6 Apr 2023 13:26:32 GMT, Radim Vansa <duke at openjdk.org> wrote:
>> Oh wait a sec, you're partially right - since we always use javaTimeNanos() if the offset calculated after the first restore wouldn't be zero, we wouldn't have this right. I should zero the offset before calculating it again. Too bad I can't create a test for that yet.
>
> Fixed the problem above; I did a (unpublished) merge with #57 and wrote a test to validate the behaviour. Can contribute it after #57 gets merged (possibly in another PR).
My concern here about this code. This code assumes multiple cycles possible, and does something in not straightforward way. I think we'd better streamline this code (assuming repeated cycles, or not).
Should not we just record checkpoint millis and nanos unconditionally?
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/53#discussion_r1165686639
More information about the crac-dev
mailing list