Skip to content

ARTEMIS-5734 upgrade to Netty 4.2 - #6690

Open
jbertram wants to merge 1 commit into
apache:mainfrom
jbertram:ARTEMIS-5734
Open

jbertram wants to merge 1 commit into
apache:mainfrom
jbertram:ARTEMIS-5734

Conversation

@jbertram

Copy link
Copy Markdown
Contributor

No description provided.


# Netty 4.2 only uses Unsafe on JDK 24+ when it's explicitly permitted. However, the broker uses some Unsafe operations
# via Netty so we must enable it. The option is unrecognized before JDK 23, so it's only added when recognized.
$JAVACMD --sun-misc-unsafe-memory-access=allow --version > /dev/null 2>&1 && ALLOW_UNSAFE="--sun-misc-unsafe-memory-access=allow"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line needs to be added to artemis-distribution/src/main/resources/bin/artemis as well (and I guess the .cmd equivalent also), otherwise the journal auto tune throws a java.lang.UnsupportedOperationException

It might also be worth to consider the addition of --enable-native-access=ALL-UNNAMED here and in the artemis-utility.profile file to get rid of the otherwise quite repetitive warning message:

WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::loadLibrary has been called by io.netty.util.internal.NativeLibraryUtil in an unnamed module (file:/...../apache-artemis-2.58...../lib/netty-common-4.2.17.Final.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled

@AntonRoskvist

Copy link
Copy Markdown
Contributor

Very nice work with this @jbertram !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants