[crac] RFR: Reset JVM start time and up time on restore (CRaCResetStartTime)
Radim Vansa
rvansa at openjdk.org
Tue Oct 17 11:50:30 UTC 2023
On Tue, 17 Oct 2023 09:29:35 GMT, Roman Marchenko <rmarchenko at openjdk.org> wrote:
> This change adds an opportunity reset both JVM's start time and uptime on restoring.
>
> Resetting time may be performed with the new flag "-XX:+CRaCResetStartTime".
>
> The flag is 'false' by default.
src/hotspot/os/linux/crac_linux.cpp line 468:
> 466:
> 467: void crac::initialize_time_counters() {
> 468: os::Posix::init();
The initialization updates some condition variable attributes; have you checked if there's any chance that another thread could observe an inconsistent state while this is updated?
test/jdk/jdk/crac/ResetStartTimeTest.java line 40:
> 38: * @library /test/lib
> 39: * @build SimpleTest
> 40: * @requires (os.family == "linux")
I think that if you use simengine the test is applicable to other platforms as well.
test/jdk/jdk/crac/ResetStartTimeTest.java line 44:
> 42: * @run driver/timeout=60 jdk.test.lib.crac.CracTest true
> 43: */
> 44: public class SimpleTest implements CracTest {
Could you please name the test `ResetStartTimeTest` to match the filename?
test/jdk/jdk/crac/ResetStartTimeTest.java line 75:
> 73: assertLessThan(uptime1, WAIT_TIMEOUT);
> 74: } else {
> 75: assertLessThan(uptime0, uptime1);
If the C/R is really quick this should be <=
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/130#discussion_r1361985624
PR Review Comment: https://git.openjdk.org/crac/pull/130#discussion_r1361962742
PR Review Comment: https://git.openjdk.org/crac/pull/130#discussion_r1361959649
PR Review Comment: https://git.openjdk.org/crac/pull/130#discussion_r1361962107
More information about the crac-dev
mailing list