[crac] RFR: Fix ordering of invocation on Resources [v10]
Anton Kozlov
akozlov at openjdk.org
Wed May 10 10:08:51 UTC 2023
On Wed, 10 May 2023 09:38:50 GMT, Radim Vansa <duke at openjdk.org> wrote:
>> * keeps the original handling of exceptions: afterRestore is called even if beforeCheckpoint throws
>> * allows to register a resource in a context that did not start beforeCheckpoint invocations yet
>> * registering resource in previous/running context fails the checkpoint but does not trigger exception immediately
>> * instead this will be one of the recorded exceptions and the resource has a chance to fire next time
>> * allowed registration of resources can be invoked from other thread without deadlock; illegal registration can deadlock, though
>
> Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:
>
> Remove mention of single-threaded notifications
First itertation, have not looked carefully on the doc and context changes
src/java.base/share/classes/jdk/internal/crac/JDKContext.java line 42:
> 40: };
> 41:
> 42: public JDKContext() {
Why `public`?
src/java.base/share/classes/jdk/internal/crac/LoggerContainer.java line 10:
> 8: */
> 9: public class LoggerContainer {
> 10: public static final System.Logger logger = System.getLogger("jdk.internal.crac");
Please keep `jdk.crac` as having the code in jdk.internal.crac is implementation detail, but this name is a configuration interface for users.
test/jdk/jdk/crac/LazyProps.java line 54:
> 52: Core.getGlobalContext().register(resource);
> 53:
> 54: System.setProperty("jdk.crac.debug", "true");
The test was added in https://github.com/openjdk/crac/pull/12, preventing problems with access to the properties happens before j.l.System initialized.
But the test checks the logging can be enabled as late as possible before checkpoint. Since the logging enabled in the command line, the test makes a little sense now...
-------------
PR Review: https://git.openjdk.org/crac/pull/60#pullrequestreview-1420232750
PR Review Comment: https://git.openjdk.org/crac/pull/60#discussion_r1189650678
PR Review Comment: https://git.openjdk.org/crac/pull/60#discussion_r1189655234
PR Review Comment: https://git.openjdk.org/crac/pull/60#discussion_r1189666134
More information about the crac-dev
mailing list