[crac] RFR: Selectable Global Context implementation

Radim Vansa rvansa at openjdk.org
Fri Jun 30 06:42:21 UTC 2023


On Thu, 29 Jun 2023 12:29:26 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:

>> If it's a requirement (and not an optimization), how come it's not prevented from running? (the blocking was there for a time before you reverted that, wasn't it?)
>
> This piece of code is reletated to this part of the description
> 
>> To make properties available, it was required to delay Reference resource registration. Otherwise, the GlobalContext implementation decision had to be done too early, in the Reference initialization during JDK bootstrapping, before Properties are available.
> 
> Without this code, the ReferenceResource was registered during Reference initialization. At that point, Properties were not initalized yet, so any attempt to call System.getProperty() threw NPE (regardless parameters).
> 
> I.e. if we have the default context implementation configuration via properties, we need to delay ReferenceResource registration.

I understand moving the registration from Reference clinit, and if you'd rather keep the implementation here, let's keep it that way. I was referring to

> it's checkpoint requirement as a procedure that no reference processing is in progress at some certain point

- I am not sure what creates this requirement, and it is not 100% guaranteed the way it's implemented now.

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

PR Review Comment: https://git.openjdk.org/crac/pull/87#discussion_r1247492822


More information about the crac-dev mailing list