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

Radim Vansa duke at openjdk.org
Thu Apr 20 08:09:26 UTC 2023


> 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 incrementally with one additional commit since the last revision:

  Set nanotime only if bootid changes

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

Changes:
  - all: https://git.openjdk.org/crac/pull/53/files
  - new: https://git.openjdk.org/crac/pull/53/files/b59d738a..5cc81961

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=crac&pr=53&range=03
 - incr: https://webrevs.openjdk.org/?repo=crac&pr=53&range=02-03

  Stats: 135 lines in 6 files changed: 98 ins; 3 del; 34 mod
  Patch: https://git.openjdk.org/crac/pull/53.diff
  Fetch: git fetch https://git.openjdk.org/crac.git pull/53/head:pull/53

PR: https://git.openjdk.org/crac/pull/53


More information about the crac-dev mailing list