[crac] RFR: 8354432: [CRaC] Timed waiting finishes early w.r.t. wall clock time [v2]

Timofei Pushkin tpushkin at openjdk.org
Mon Apr 14 13:14:24 UTC 2025


On Mon, 14 Apr 2025 07:15:25 GMT, Radim Vansa <rvansa at openjdk.org> wrote:

> The test would really fail if going back between checkpoint and the end of 1000 ms wait, correct?

Yes, it would (and still will) fail if either:
- The time goes back between checkpoint and restore
- The time goes back between the moment it is read in `record_time_before_checkpoint()` and in the test for `after`

> src/hotspot/share/runtime/crac.cpp line 62:
> 
>> 60: CracEngine *crac::_engine = nullptr;
>> 61: // Timestamps recorded before checkpoint
>> 62: jlong crac::checkpoint_wallclock_seconds; // Wall clock time, full seconds
> 
> Not even a nitpick: I wonder if we should document private fields here or in the header file, WDYT? (I stand guilty for having docs for `javaTimeNanos_offset` here...).

I think placing them in the header would be better

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

PR Comment: https://git.openjdk.org/crac/pull/221#issuecomment-2800736723
PR Review Comment: https://git.openjdk.org/crac/pull/221#discussion_r2041562189


More information about the crac-dev mailing list