[crac] RFR: Correct System.nanotime() value after restore [v10]

Anton Kozlov akozlov at openjdk.org
Mon Jun 19 11:57:44 UTC 2023

On Fri, 19 May 2023 10:25:18 GMT, Radim Vansa <rvansa at openjdk.org> wrote:

>> There are various places both inside JDK and in libraries that rely on monotonicity of `System.nanotime()`. When the process is restored on a different machine the value will likely differ as the implementation provides time since machine boot. This PR records wall clock time before checkpoint and after restore and tries to adjust the value provided by nanotime() to reasonably correct value.
> Radim Vansa has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 23 commits:
>  - Merge branch 'crac' into nanotime
>  - Merge branch 'crac' into nanotime
>  - More checks when reading boot ID
>  - Merge branch 'crac' into nanotime
>  - Do not use negative monotonic offset
>  - Merge branch 'crac' into nanotime
>  - Fix whitespaces
>  - Use image under ghcr.io/crac
>  - Ensure monotonicity for the same boot
>  - Set nanotime only if bootid changes
>  - ... and 13 more: https://git.openjdk.org/crac/compare/ed3efac0...7d7a4103

Sorry, LGTM!


Marked as reviewed by akozlov (Lead).

PR Review: https://git.openjdk.org/crac/pull/53#pullrequestreview-1486055855

More information about the crac-dev mailing list