-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Suppress illegal reflective access in shared cache #70344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suppress illegal reflective access in shared cache #70344
Conversation
This commit temporarily supressess an illegal reflective access warning by opening the java.io module to all unnamed modules. This is needed when using the searchable snapshots shared cache due to some reflective access that occurs there. This is temporary while we explore alternatives.
Pinging @elastic/es-core-infra (Team:Core/Infra) |
Pinging @elastic/es-distributed (Team:Distributed) |
This is to suppress these lines that get dumped to
It is a bad user experience to encounter this output. Yes, this solution is a hammer to suppress them, but there aren't any obvious alternatives given that we are running without modules, and therefore the only way we can grant the necessary opens here are to all unnamed modules. If we were running with modules, we could open this only to the necessary module, preferably by placing the opens declaration in the JAR manifest itself. |
And we will encounter a lot of noise from this line:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about putting it in SystemJvmOptions since it is an implementation detail of the server rather than something the user should even need to think about?
@rjernst |
Actually @rjernst in #54853 I already used versioning logic in Lines 63 to 69 in 79689fd
I've pushed dd271d1 and when backporting to 7.12 and 7.x will do the same here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This commit temporarily supressess an illegal reflective access warning by opening the java.io module to all unnamed modules. This is needed when using the searchable snapshots shared cache due to some reflective access that occurs there. This is temporary while we explore alternatives.
Relates #70285