-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Fix a few toString implementations+usages that affect test performance #112380
Fix a few toString implementations+usages that affect test performance #112380
Conversation
No need to precompute the toString for `ActionListener` and `Releasable`, that's quite expensive at times. Also string concat is way faster than formating these days, so use that in the transport channels. Lastly, short-circuit some obvious spots in network address serialization and remove code that duplicates the JDK (remove the IPV4 specific forbidden API because it makes no sense, but still needed to disable the check to make the build green because of the exclude on the parent class).
Pinging @elastic/es-core-infra (Team:Core/Infra) |
@@ -246,14 +247,14 @@ public static String toUriString(InetAddress ip) { | |||
* @return {@code String} containing the text-formatted IP address | |||
* @since 10.0 | |||
*/ | |||
@SuppressForbidden(reason = "java.net.Inet4Address#getHostAddress() is fine no need to duplicate its code") |
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.
The comment for this suggests "use NetworkAddress format() to print IP or IP+ports". Is that a better way to achieve this?
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.
Not sure, I think the problem is only with the ipv6 version of this method, but it seems impossible to selectively catch that only with forbidden apis?
elastic#112380) No need to precompute the toString for `ActionListener` and `Releasable`, that's quite expensive at times. Also string concat is way faster than formating these days, so use that in the transport channels. Lastly, short-circuit some obvious spots in network address serialization and remove code that duplicates the JDK (remove the IPV4 specific forbidden API because it makes no sense, but still needed to disable the check to make the build green because of the exclude on the parent class).
elastic#112380) No need to precompute the toString for `ActionListener` and `Releasable`, that's quite expensive at times. Also string concat is way faster than formating these days, so use that in the transport channels. Lastly, short-circuit some obvious spots in network address serialization and remove code that duplicates the JDK (remove the IPV4 specific forbidden API because it makes no sense, but still needed to disable the check to make the build green because of the exclude on the parent class).
In elastic#112380 we changed this `assert` to yield a `String` on failure rather than the original `ElasticsearchException`, which means we don't see the original completion's stack trace any more. This commit reinstates the lost stack trace.
In #112380 we changed this `assert` to yield a `String` on failure rather than the original `ElasticsearchException`, which means we don't see the original completion's stack trace any more. This commit reinstates the lost stack trace.
In elastic#112380 we changed this `assert` to yield a `String` on failure rather than the original `ElasticsearchException`, which means we don't see the original completion's stack trace any more. This commit reinstates the lost stack trace.
In elastic#112380 we changed this `assert` to yield a `String` on failure rather than the original `ElasticsearchException`, which means we don't see the original completion's stack trace any more. This commit reinstates the lost stack trace.
In elastic#112380 we changed this `assert` to yield a `String` on failure rather than the original `ElasticsearchException`, which means we don't see the original completion's stack trace any more. This commit reinstates the lost stack trace.
In elastic#112380 we changed this `assert` to yield a `String` on failure rather than the original `ElasticsearchException`, which means we don't see the original completion's stack trace any more. This commit reinstates the lost stack trace.
In #112380 we changed this `assert` to yield a `String` on failure rather than the original `ElasticsearchException`, which means we don't see the original completion's stack trace any more. This commit reinstates the lost stack trace.
In #112380 we changed this `assert` to yield a `String` on failure rather than the original `ElasticsearchException`, which means we don't see the original completion's stack trace any more. This commit reinstates the lost stack trace.
In #112380 we changed this `assert` to yield a `String` on failure rather than the original `ElasticsearchException`, which means we don't see the original completion's stack trace any more. This commit reinstates the lost stack trace.
In #112380 we changed this `assert` to yield a `String` on failure rather than the original `ElasticsearchException`, which means we don't see the original completion's stack trace any more. This commit reinstates the lost stack trace.
In elastic#112380 we changed this `assert` to yield a `String` on failure rather than the original `ElasticsearchException`, which means we don't see the original completion's stack trace any more. This commit reinstates the lost stack trace.
In elastic#112380 we changed this `assert` to yield a `String` on failure rather than the original `ElasticsearchException`, which means we don't see the original completion's stack trace any more. This commit reinstates the lost stack trace.
No need to precompute the toString for
ActionListener
andReleasable
, that's quite expensive at times (taking like 30s across all threads forserver:integTestCase
needlessly). Also string concat is way faster than formating these days, so use that in the transport channels. Lastly, short-circuit some obvious spots in network address serialization and remove code that duplicates the JDK (remove the IPV4 specific forbidden API because it makes no sense, but still needed to disable the check to make the build green because of the exclude on the parent class).