Fix Graal initialization - #21444
Draft
Nadahar wants to merge 1 commit into
Draft
Conversation
The fix consists of swapping the classloader while creating the engine, using the core GraalUtil for language resolution, implementing `isReady()` to indicate when initialization is complete, and breaking the cyclic dependency caused by the dependency trackers. In addition, the features have been modified to rely on the core defined Graal features. Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
Contributor
Author
|
@florian-h05 @HolgerHees FYI. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a companion PR of openhab/openhab-core#5787. The build will fail because the changes from openhab/openhab-core#5787 aren't in core.
I've done multiple things to make Graal initialization work. I'm hopeful that this will also make it possible to install and uninstall Graal based add-ons without restarting.
The steps are:
GraalUtilfor thread-safe language resolutionisReady()to indicate when initialization is completeTogether these things make this seem dead stable to me. I can't say for sure that every measure is required; I've just worked to solve the problems I've met along the way. Maybe some aren't ultimately necessary, but I've included it all. Some things might be "better" even if they weren't the direct cause of the initialization problems.
I'm creating this as a draft, because both this and the core PR need further evaluation/discussion/testing.