[crac] RFR: Fix ordering of invocation on Resources [v3]

Anton Kozlov akozlov at openjdk.org
Tue May 2 10:57:41 UTC 2023


On Tue, 2 May 2023 07:21:24 GMT, Radim Vansa <duke at openjdk.org> wrote:

> Does that matter, though? The registration itself will be done for next C/R in all cases. The situation where the registrar entered the `register()` method, added the resource and recorded an exception but this has been silently discarded is equivalent to the situation where it entered the `register()` just after restore was completed. 

Suppose aR() has some really important side-effect, it's totally necessarily to run that on restore. Then it falls to the category of problems this PR tries to solve (silently ignoring registered resources). 

> If these are independent you cannot force it to fail reliably, unless there is something in running the resource notifications that depends on the registration (but it's not as all resources have been notified).
>
> If the intend was to do something after the current restore the resource should have been registered in a blocking way before the checkpoint or as part of the blocking beforeCheckpoint, not absolutely independently.

Some form of the guarantee will be good. The blocking registration, I assume it something like register() to finish only when the argument is successfully registered? This looks like a viable approach, e.g. it does specify the behavior around possible race and do not affect "normal" workflow when registration happens way before the checkpoint. Do you see any problem with blocking registration?

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

PR Review Comment: https://git.openjdk.org/crac/pull/60#discussion_r1182393741


More information about the crac-dev mailing list