[crac] RFR: Introduce per-Priority Context with different policies
Anton Kozlov
akozlov at openjdk.org
Thu May 18 16:17:40 UTC 2023
On Thu, 18 May 2023 11:52:30 GMT, Radim Vansa <duke at openjdk.org> wrote:
>> A follow-up work for #60:
>>
>> * Each priority now has a dedicated context, so contextes may provide different policies. CALL_SITE now uses new CriticalUnorderedContext that runs beforeCheckpoint on concurrent registration, fixes [1]. Whether or not CALL_SITE needs to be registered to at all is an open question and out of scope of this PR.
>> * the Global Context reverted from BlockingOrderedContext to OrderedContext, as that may have a huge impact on users. Probably we'll want to expose blocking/criticalUnorderd context along the global one, or at some point expose an implementation. But this is also out of scope of the PR.
>> * hierachy of the Context implementations are cleaned up a bit [2]
>>
>> The JDKContext is now just a holder of ClaimedFDs, I'll address this in a follow-up that depends on this Context follow-up.
>>
>> [1] https://github.com/openjdk/crac/pull/60#issuecomment-1545588281
>> [2] https://github.com/openjdk/crac/pull/60#discussion_r1185510445
>
> src/java.base/share/classes/jdk/crac/impl/ExceptionHolder.java line 37:
>
>> 35: E exception = get();
>> 36: if (exception.getClass() == e.getClass()) {
>> 37: for (Throwable t : e.getSuppressed()) {
>
> We're losing the message and stack trace here. Previously, if the message was present it was added to the suppressed list as well.
> If you want to create aggregate-only exceptions (only suppressed list would be relevant) these should be declared as final, with only one no-arg constructor and stack trace collection disabled - but that would have some problems as discussed in https://github.com/openjdk/crac/pull/64/files#r1190679470
To avoid this PR grow too much, I basically agree with the comments, but still propose an aggregate exception, replied to the comment.
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/74#discussion_r1198015862
More information about the crac-dev
mailing list