[crac] RFR: Reseed secure random on checkpoint restore

Alexey Bakhtin abakhtin at openjdk.java.net
Mon Dec 20 15:48:18 UTC 2021


On Fri, 17 Dec 2021 19:55:13 GMT, Dan Heidinga <duke at openjdk.java.net> wrote:

>> Hi @DanHeidinga 
>> Default global CRaC Context implementation uses resource priorities to define the order of checkpoint notifications (beforeCheckpoint). Resource priorities are automatically assigned incrementally upon resource registration in the context. The lowest priority is 0. Order of checkpoint notification is the reverse order of registration.
>> There are JDKContext and JDKResource internal implementations. These classes allow assigning priorities to specific resources. The order of checkpoint notifications for JDKResources is from higher to lower priorities.
>
> Given that explanation, how were `-12` & `-11` chosen here?  Randomly as low enough to ensure these are changed late?

Yes and No :) I left some space for the future JDK resources that depend on the secure randoms (use secure random inside own beforeCheckpoint method)
Maybe these priorities should be collected in a single class, e.g. defined in the JDKresource interface

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

PR: https://git.openjdk.java.net/crac/pull/7


More information about the crac-dev mailing list