-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Update Netty to 4.1.16.Final #28345
Update Netty to 4.1.16.Final #28345
Changes from 2 commits
355964a
8ef7447
b073780
20b346c
dd5116b
c157fd6
3b5a838
d81c998
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
76b4eecbf7eeef749019f15295014e0106aced3c |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
7e22fb8829a02b7b3f71bfbfcd4a69f4792c7dd1 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cd855bcfe88581efb465f1f87cb73bf9270c549a |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cdc68be57df51293d08ee5792a4bc0628f33f67c |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
b7b9aab26acf72ee376fb1fbbee6e35675a7b8d6 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
41cb6fa04ed3ccc0c83f5b8e3a11454bca0dc053 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2985accbe0c3ab5de6ebcb1574986230467ed652 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ | |
import io.netty.channel.Channel; | ||
import io.netty.channel.ChannelFuture; | ||
import io.netty.util.NettyRuntime; | ||
import io.netty.util.internal.ThrowableUtil; | ||
import io.netty.util.internal.logging.InternalLogger; | ||
import io.netty.util.internal.logging.InternalLoggerFactory; | ||
import org.apache.logging.log4j.Logger; | ||
|
@@ -35,6 +36,8 @@ | |
import org.elasticsearch.common.logging.ESLoggerFactory; | ||
|
||
import java.io.IOException; | ||
import java.security.AccessController; | ||
import java.security.PrivilegedAction; | ||
import java.util.ArrayList; | ||
import java.util.Arrays; | ||
import java.util.Collection; | ||
|
@@ -61,7 +64,11 @@ public InternalLogger newInstance(final String name) { | |
} | ||
|
||
public static void setup() { | ||
|
||
// TODO remove this once we get a fix into Netty so we don't have to do this | ||
AccessController.doPrivileged((PrivilegedAction<Void>) () -> { | ||
ThrowableUtil.haveSuppressed(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would you leave a comment that this is triggering class initialization? This is horrific. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I pushed b073780 |
||
return null; | ||
}); | ||
} | ||
|
||
private static AtomicBoolean isAvailableProcessorsSet = new AtomicBoolean(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,12 @@ | |
* under the License. | ||
*/ | ||
|
||
grant { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we grant this only to transport-netty4? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am pretty sure this is handled by the module framework? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That is correct. A general grant means all the jars in this plugin. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not quite; it grants it to all JARs in the module and I am asking for this to be limited to transport-netty4 only. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or whatever Netty JAR this is in. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That can't work since the doPriv block is in our module code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It could be granted to our jar and the single netty jar explicitly though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, that should have been an |
||
// needed for Netty since they use reflection in ThrowableUtil :( | ||
// https://github.com/netty/netty/issues/7614 | ||
permission java.lang.RuntimePermission "accessDeclaredMembers"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we open an issue in netty and link here that netty should work gracefully if it does not have this permission? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Opened netty/netty#7614 and added in the comment of this section |
||
}; | ||
|
||
grant codeBase "${codebase.netty-common}" { | ||
// for reading the system-wide configuration for the backlog of established sockets | ||
permission java.io.FilePermission "/proc/sys/net/core/somaxconn", "read"; | ||
|
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.
Seems like these got moved out of alphabetical order?
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.
+1