[crac] RFR: Introduce per-Priority Context with different policies [v2]

Radim Vansa duke at openjdk.org
Tue May 30 06:27:52 UTC 2023


On Mon, 29 May 2023 18:26:02 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:

>> src/java.base/share/classes/jdk/crac/impl/CriticalUnorderedContext.java line 85:
>> 
>>> 83:                     invokeBeforeCheckpoint(resource);
>>> 84:                 } catch (Exception e) {
>>> 85:                     concurrentCheckpointException.handle(e);
>> 
>> I **really** dislike the fact that the exception is reported only during restore, which may never happen. The checkpoint should be marked for failure in here.
>
> This makes sense. As a thought excercise, it is possible to have add a last Resource, that will query all pending exceptions in all previous contextes, or make this context block once all beforeCheckpoint are done and there is nowhere to report exceptions. Both are also possible for user contextes, outside of the system classes.

If you're speaking about querying Contexts, that means extending its API for traversing and fetching those. Alternatively, should the contexts report exceptions to a well-known resource this resource would become a part of the API.

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

PR Review Comment: https://git.openjdk.org/crac/pull/74#discussion_r1209758424


More information about the crac-dev mailing list