Skip to content

Commit 0bfd18c

Browse files
authored
Revert upgrade to Netty 4.1.25.Final (#31282)
This reverts upgrading to Netty 4.1.25.Final until we have a cleaner solution to dealing with the object cleaner thread.
1 parent 905663a commit 0bfd18c

File tree

93 files changed

+98
-438
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+98
-438
lines changed

modules/reindex/src/test/java/org/elasticsearch/index/reindex/ReindexFromRemoteWithAuthTests.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
package org.elasticsearch.index.reindex;
2121

22-
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
2322
import org.apache.lucene.util.SetOnce;
2423
import org.elasticsearch.ElasticsearchSecurityException;
2524
import org.elasticsearch.ElasticsearchStatusException;
@@ -42,7 +41,6 @@
4241
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
4342
import org.elasticsearch.env.Environment;
4443
import org.elasticsearch.env.NodeEnvironment;
45-
import org.elasticsearch.index.reindex.test.ObjectCleanerThreadThreadFilter;
4644
import org.elasticsearch.plugins.ActionPlugin;
4745
import org.elasticsearch.plugins.Plugin;
4846
import org.elasticsearch.rest.RestStatus;
@@ -66,7 +64,6 @@
6664
import static org.elasticsearch.index.reindex.ReindexTestCase.matcher;
6765
import static org.hamcrest.Matchers.containsString;
6866

69-
@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class})
7067
public class ReindexFromRemoteWithAuthTests extends ESSingleNodeTestCase {
7168
private TransportAddress address;
7269

modules/reindex/src/test/java/org/elasticsearch/index/reindex/RetryTests.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
package org.elasticsearch.index.reindex;
2121

22-
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
2322
import org.elasticsearch.action.ActionFuture;
2423
import org.elasticsearch.action.admin.cluster.node.info.NodeInfo;
2524
import org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse;
@@ -33,7 +32,6 @@
3332
import org.elasticsearch.common.transport.TransportAddress;
3433
import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException;
3534
import org.elasticsearch.index.query.QueryBuilders;
36-
import org.elasticsearch.index.reindex.test.ObjectCleanerThreadThreadFilter;
3735
import org.elasticsearch.plugins.Plugin;
3836
import org.elasticsearch.test.ESIntegTestCase;
3937
import org.elasticsearch.threadpool.ThreadPool;
@@ -57,7 +55,6 @@
5755
* Integration test for retry behavior. Useful because retrying relies on the way that the
5856
* rest of Elasticsearch throws exceptions and unit tests won't verify that.
5957
*/
60-
@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class})
6158
public class RetryTests extends ESIntegTestCase {
6259

6360
private static final int DOC_COUNT = 20;

modules/reindex/src/test/java/org/elasticsearch/index/reindex/test/ObjectCleanerThreadThreadFilter.java

Lines changed: 0 additions & 32 deletions
This file was deleted.

modules/transport-netty4/build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ compileTestJava.options.compilerArgs << "-Xlint:-cast,-deprecation,-rawtypes,-tr
3434

3535
dependencies {
3636
// network stack
37-
compile "io.netty:netty-buffer:4.1.25.Final"
38-
compile "io.netty:netty-codec:4.1.25.Final"
39-
compile "io.netty:netty-codec-http:4.1.25.Final"
40-
compile "io.netty:netty-common:4.1.25.Final"
41-
compile "io.netty:netty-handler:4.1.25.Final"
42-
compile "io.netty:netty-resolver:4.1.25.Final"
43-
compile "io.netty:netty-transport:4.1.25.Final"
37+
compile "io.netty:netty-buffer:4.1.16.Final"
38+
compile "io.netty:netty-codec:4.1.16.Final"
39+
compile "io.netty:netty-codec-http:4.1.16.Final"
40+
compile "io.netty:netty-common:4.1.16.Final"
41+
compile "io.netty:netty-handler:4.1.16.Final"
42+
compile "io.netty:netty-resolver:4.1.16.Final"
43+
compile "io.netty:netty-transport:4.1.16.Final"
4444
}
4545

4646
dependencyLicenses {
@@ -161,6 +161,6 @@ thirdPartyAudit.excludes = [
161161

162162
'org.conscrypt.AllocatedBuffer',
163163
'org.conscrypt.BufferAllocator',
164-
'org.conscrypt.Conscrypt',
164+
'org.conscrypt.Conscrypt$Engines',
165165
'org.conscrypt.HandshakeListener'
166166
]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
63b5fa95c74785e16f2c30ce268bc222e35c8cb5

modules/transport-netty4/licenses/netty-buffer-4.1.25.Final.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
d84a1f21768b7309c2954521cf5a1f46c2309eb1

modules/transport-netty4/licenses/netty-codec-4.1.25.Final.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
d64312378b438dfdad84267c599a053327c6f02a

modules/transport-netty4/licenses/netty-codec-http-4.1.25.Final.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
177a6b30cca92f6f5f9873c9befd681377a4c328

modules/transport-netty4/licenses/netty-common-4.1.25.Final.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fec0e63e7dd7f4eeef7ea8dc47a1ff32dfc7ebc2

modules/transport-netty4/licenses/netty-handler-4.1.25.Final.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
f6eb553b53fb3a90a8ac1170697093fed82eae28

modules/transport-netty4/licenses/netty-resolver-4.1.25.Final.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3c8ee2c4d4a1cbb947a5c184c7aeb2204260958b

modules/transport-netty4/licenses/netty-transport-4.1.25.Final.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.

modules/transport-netty4/src/main/plugin-metadata/plugin-security.policy

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ grant codeBase "${codebase.netty-common}" {
2121
// for reading the system-wide configuration for the backlog of established sockets
2222
permission java.io.FilePermission "/proc/sys/net/core/somaxconn", "read";
2323

24-
permission java.lang.RuntimePermission "setContextClassLoader";
25-
2624
// netty makes and accepts socket connections
2725
permission java.net.SocketPermission "*", "accept,connect";
2826
};

modules/transport-netty4/src/test/java/org/elasticsearch/test/Netty4IntegTestCase.java renamed to modules/transport-netty4/src/test/java/org/elasticsearch/ESNetty4IntegTestCase.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,19 @@
1616
* specific language governing permissions and limitations
1717
* under the License.
1818
*/
19+
package org.elasticsearch;
1920

20-
package org.elasticsearch.test;
21-
22-
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
2321
import org.elasticsearch.common.network.NetworkModule;
2422
import org.elasticsearch.common.settings.Settings;
2523
import org.elasticsearch.plugins.Plugin;
24+
import org.elasticsearch.test.ESIntegTestCase;
2625
import org.elasticsearch.transport.Netty4Plugin;
2726
import org.elasticsearch.transport.netty4.Netty4Transport;
2827

2928
import java.util.Arrays;
3029
import java.util.Collection;
3130

32-
@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class})
33-
public abstract class Netty4IntegTestCase extends ESIntegTestCase {
31+
public abstract class ESNetty4IntegTestCase extends ESIntegTestCase {
3432

3533
@Override
3634
protected boolean ignoreExternalCluster() {

modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4BadRequestTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
package org.elasticsearch.http.netty4;
2121

2222
import io.netty.handler.codec.http.FullHttpResponse;
23-
import org.elasticsearch.test.Netty4TestCase;
2423
import org.elasticsearch.ElasticsearchException;
2524
import org.elasticsearch.common.network.NetworkService;
2625
import org.elasticsearch.common.settings.Settings;
@@ -34,6 +33,7 @@
3433
import org.elasticsearch.rest.RestChannel;
3534
import org.elasticsearch.rest.RestRequest;
3635
import org.elasticsearch.rest.RestStatus;
36+
import org.elasticsearch.test.ESTestCase;
3737
import org.elasticsearch.threadpool.TestThreadPool;
3838
import org.elasticsearch.threadpool.ThreadPool;
3939
import org.junit.After;
@@ -48,7 +48,7 @@
4848
import static org.hamcrest.Matchers.equalTo;
4949
import static org.hamcrest.Matchers.hasSize;
5050

51-
public class Netty4BadRequestTests extends Netty4TestCase {
51+
public class Netty4BadRequestTests extends ESTestCase {
5252

5353
private NetworkService networkService;
5454
private MockBigArrays bigArrays;

modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpChannelTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
import io.netty.handler.codec.http.HttpVersion;
4242
import io.netty.util.Attribute;
4343
import io.netty.util.AttributeKey;
44-
import org.elasticsearch.test.Netty4TestCase;
4544
import org.elasticsearch.common.bytes.BytesReference;
4645
import org.elasticsearch.common.bytes.ReleasablePagedBytesReference;
4746
import org.elasticsearch.common.io.stream.BytesStreamOutput;
@@ -65,6 +64,7 @@
6564
import org.elasticsearch.rest.BytesRestResponse;
6665
import org.elasticsearch.rest.RestResponse;
6766
import org.elasticsearch.rest.RestStatus;
67+
import org.elasticsearch.test.ESTestCase;
6868
import org.elasticsearch.threadpool.TestThreadPool;
6969
import org.elasticsearch.threadpool.ThreadPool;
7070
import org.elasticsearch.transport.netty4.Netty4Utils;
@@ -90,7 +90,7 @@
9090
import static org.hamcrest.Matchers.notNullValue;
9191
import static org.hamcrest.Matchers.nullValue;
9292

93-
public class Netty4HttpChannelTests extends Netty4TestCase {
93+
public class Netty4HttpChannelTests extends ESTestCase {
9494

9595
private NetworkService networkService;
9696
private ThreadPool threadPool;

modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpPipeliningHandlerTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
import io.netty.handler.codec.http.HttpVersion;
3737
import io.netty.handler.codec.http.LastHttpContent;
3838
import io.netty.handler.codec.http.QueryStringDecoder;
39-
import org.elasticsearch.test.Netty4TestCase;
4039
import org.elasticsearch.common.Randomness;
4140
import org.elasticsearch.http.HttpPipelinedRequest;
41+
import org.elasticsearch.test.ESTestCase;
4242
import org.junit.After;
4343

4444
import java.nio.channels.ClosedChannelException;
@@ -61,7 +61,7 @@
6161
import static io.netty.handler.codec.http.HttpVersion.HTTP_1_1;
6262
import static org.hamcrest.core.Is.is;
6363

64-
public class Netty4HttpPipeliningHandlerTests extends Netty4TestCase {
64+
public class Netty4HttpPipeliningHandlerTests extends ESTestCase {
6565

6666
private final ExecutorService handlerService = Executors.newFixedThreadPool(randomIntBetween(4, 8));
6767
private final ExecutorService eventLoopService = Executors.newFixedThreadPool(1);

modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpRequestSizeLimitIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
package org.elasticsearch.http.netty4;
2121

2222
import io.netty.handler.codec.http.FullHttpResponse;
23-
import org.elasticsearch.test.Netty4IntegTestCase;
23+
import org.elasticsearch.ESNetty4IntegTestCase;
2424
import org.elasticsearch.common.collect.Tuple;
2525
import org.elasticsearch.common.settings.Settings;
2626
import org.elasticsearch.common.transport.TransportAddress;
@@ -45,7 +45,7 @@
4545
* a single node "cluster". We also force test infrastructure to use the node client instead of the transport client for the same reason.
4646
*/
4747
@ClusterScope(scope = Scope.TEST, supportsDedicatedMasters = false, numClientNodes = 0, numDataNodes = 1, transportClientRatio = 0)
48-
public class Netty4HttpRequestSizeLimitIT extends Netty4IntegTestCase {
48+
public class Netty4HttpRequestSizeLimitIT extends ESNetty4IntegTestCase {
4949

5050
private static final ByteSizeValue LIMIT = new ByteSizeValue(2, ByteSizeUnit.KB);
5151

modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpServerPipeliningTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import io.netty.handler.codec.http.HttpHeaderNames;
3333
import io.netty.handler.codec.http.HttpResponseStatus;
3434
import io.netty.handler.codec.http.HttpVersion;
35-
import org.elasticsearch.test.Netty4TestCase;
3635
import org.elasticsearch.common.network.NetworkService;
3736
import org.elasticsearch.common.settings.Settings;
3837
import org.elasticsearch.common.transport.TransportAddress;
@@ -43,6 +42,7 @@
4342
import org.elasticsearch.http.HttpServerTransport;
4443
import org.elasticsearch.http.NullDispatcher;
4544
import org.elasticsearch.indices.breaker.NoneCircuitBreakerService;
45+
import org.elasticsearch.test.ESTestCase;
4646
import org.elasticsearch.threadpool.TestThreadPool;
4747
import org.elasticsearch.threadpool.ThreadPool;
4848
import org.junit.After;
@@ -61,7 +61,7 @@
6161
/**
6262
* This test just tests, if he pipelining works in general with out any connection the Elasticsearch handler
6363
*/
64-
public class Netty4HttpServerPipeliningTests extends Netty4TestCase {
64+
public class Netty4HttpServerPipeliningTests extends ESTestCase {
6565
private NetworkService networkService;
6666
private ThreadPool threadPool;
6767
private MockBigArrays bigArrays;

modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpServerTransportTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
import io.netty.handler.codec.http.HttpResponseStatus;
3939
import io.netty.handler.codec.http.HttpUtil;
4040
import io.netty.handler.codec.http.HttpVersion;
41-
import org.elasticsearch.test.Netty4TestCase;
4241
import org.elasticsearch.ElasticsearchException;
4342
import org.elasticsearch.common.Strings;
4443
import org.elasticsearch.common.bytes.BytesArray;
@@ -60,6 +59,7 @@
6059
import org.elasticsearch.rest.BytesRestResponse;
6160
import org.elasticsearch.rest.RestChannel;
6261
import org.elasticsearch.rest.RestRequest;
62+
import org.elasticsearch.test.ESTestCase;
6363
import org.elasticsearch.threadpool.TestThreadPool;
6464
import org.elasticsearch.threadpool.ThreadPool;
6565
import org.junit.After;
@@ -94,7 +94,7 @@
9494
/**
9595
* Tests for the {@link Netty4HttpServerTransport} class.
9696
*/
97-
public class Netty4HttpServerTransportTests extends Netty4TestCase {
97+
public class Netty4HttpServerTransportTests extends ESTestCase {
9898

9999
private NetworkService networkService;
100100
private ThreadPool threadPool;

modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4PipeliningIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
package org.elasticsearch.http.netty4;
2121

2222
import io.netty.handler.codec.http.FullHttpResponse;
23-
import org.elasticsearch.test.Netty4IntegTestCase;
23+
import org.elasticsearch.ESNetty4IntegTestCase;
2424
import org.elasticsearch.common.transport.TransportAddress;
2525
import org.elasticsearch.http.HttpServerTransport;
2626
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
@@ -33,7 +33,7 @@
3333
import static org.hamcrest.Matchers.is;
3434

3535
@ClusterScope(scope = Scope.TEST, supportsDedicatedMasters = false, numDataNodes = 1)
36-
public class Netty4PipeliningIT extends Netty4IntegTestCase {
36+
public class Netty4PipeliningIT extends ESNetty4IntegTestCase {
3737

3838
@Override
3939
protected boolean addMockHttpTransport() {

modules/transport-netty4/src/test/java/org/elasticsearch/test/Netty4TestCase.java

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)