Skip to content

Commit

Permalink
Revert upgrade to Netty 4.1.25.Final (#31282)
Browse files Browse the repository at this point in the history
This reverts upgrading to Netty 4.1.25.Final until we have a cleaner
solution to dealing with the object cleaner thread.
  • Loading branch information
jasontedor committed Jun 12, 2018
1 parent fe4ca0f commit 98254dc
Show file tree
Hide file tree
Showing 69 changed files with 74 additions and 323 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

package org.elasticsearch.index.reindex;

import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
import org.apache.lucene.util.SetOnce;
import org.elasticsearch.ElasticsearchSecurityException;
import org.elasticsearch.ElasticsearchStatusException;
Expand All @@ -42,7 +41,6 @@
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
import org.elasticsearch.env.Environment;
import org.elasticsearch.env.NodeEnvironment;
import org.elasticsearch.index.reindex.test.ObjectCleanerThreadThreadFilter;
import org.elasticsearch.plugins.ActionPlugin;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.rest.RestStatus;
Expand All @@ -66,7 +64,6 @@
import static org.elasticsearch.index.reindex.ReindexTestCase.matcher;
import static org.hamcrest.Matchers.containsString;

@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class})
public class ReindexFromRemoteWithAuthTests extends ESSingleNodeTestCase {
private TransportAddress address;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

package org.elasticsearch.index.reindex;

import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
import org.elasticsearch.action.ActionFuture;
import org.elasticsearch.action.admin.cluster.node.info.NodeInfo;
import org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse;
Expand All @@ -34,7 +33,6 @@
import org.elasticsearch.common.transport.TransportAddress;
import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.index.reindex.test.ObjectCleanerThreadThreadFilter;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.threadpool.ThreadPool;
Expand All @@ -58,7 +56,6 @@
* Integration test for retry behavior. Useful because retrying relies on the way that the
* rest of Elasticsearch throws exceptions and unit tests won't verify that.
*/
@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class})
public class RetryTests extends ESIntegTestCase {

private static final int DOC_COUNT = 20;
Expand Down

This file was deleted.

16 changes: 8 additions & 8 deletions modules/transport-netty4/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ compileTestJava.options.compilerArgs << "-Xlint:-cast,-deprecation,-rawtypes,-tr

dependencies {
// network stack
compile "io.netty:netty-buffer:4.1.25.Final"
compile "io.netty:netty-codec:4.1.25.Final"
compile "io.netty:netty-codec-http:4.1.25.Final"
compile "io.netty:netty-common:4.1.25.Final"
compile "io.netty:netty-handler:4.1.25.Final"
compile "io.netty:netty-resolver:4.1.25.Final"
compile "io.netty:netty-transport:4.1.25.Final"
compile "io.netty:netty-buffer:4.1.16.Final"
compile "io.netty:netty-codec:4.1.16.Final"
compile "io.netty:netty-codec-http:4.1.16.Final"
compile "io.netty:netty-common:4.1.16.Final"
compile "io.netty:netty-handler:4.1.16.Final"
compile "io.netty:netty-resolver:4.1.16.Final"
compile "io.netty:netty-transport:4.1.16.Final"
}

dependencyLicenses {
Expand Down Expand Up @@ -161,6 +161,6 @@ thirdPartyAudit.excludes = [

'org.conscrypt.AllocatedBuffer',
'org.conscrypt.BufferAllocator',
'org.conscrypt.Conscrypt',
'org.conscrypt.Conscrypt$Engines',
'org.conscrypt.HandshakeListener'
]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
63b5fa95c74785e16f2c30ce268bc222e35c8cb5

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d84a1f21768b7309c2954521cf5a1f46c2309eb1

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d64312378b438dfdad84267c599a053327c6f02a

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
177a6b30cca92f6f5f9873c9befd681377a4c328

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fec0e63e7dd7f4eeef7ea8dc47a1ff32dfc7ebc2

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f6eb553b53fb3a90a8ac1170697093fed82eae28

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3c8ee2c4d4a1cbb947a5c184c7aeb2204260958b

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ 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";

permission java.lang.RuntimePermission "setContextClassLoader";

// netty makes and accepts socket connections
permission java.net.SocketPermission "*", "accept,connect";
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,19 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch;

package org.elasticsearch.test;

import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.transport.Netty4Plugin;
import org.elasticsearch.transport.netty4.Netty4Transport;

import java.util.Arrays;
import java.util.Collection;

@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class})
public abstract class Netty4IntegTestCase extends ESIntegTestCase {
public abstract class ESNetty4IntegTestCase extends ESIntegTestCase {

@Override
protected boolean ignoreExternalCluster() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
package org.elasticsearch.http.netty4;

import io.netty.handler.codec.http.FullHttpResponse;
import org.elasticsearch.test.Netty4TestCase;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.common.network.NetworkService;
import org.elasticsearch.common.settings.Settings;
Expand All @@ -34,6 +33,7 @@
import org.elasticsearch.rest.RestChannel;
import org.elasticsearch.rest.RestRequest;
import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.threadpool.TestThreadPool;
import org.elasticsearch.threadpool.ThreadPool;
import org.junit.After;
Expand All @@ -48,7 +48,7 @@
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize;

public class Netty4BadRequestTests extends Netty4TestCase {
public class Netty4BadRequestTests extends ESTestCase {

private NetworkService networkService;
private MockBigArrays bigArrays;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import io.netty.handler.codec.http.HttpVersion;
import io.netty.util.Attribute;
import io.netty.util.AttributeKey;
import org.elasticsearch.test.Netty4TestCase;
import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.bytes.ReleasablePagedBytesReference;
import org.elasticsearch.common.io.stream.BytesStreamOutput;
Expand All @@ -65,6 +64,7 @@
import org.elasticsearch.rest.BytesRestResponse;
import org.elasticsearch.rest.RestResponse;
import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.threadpool.TestThreadPool;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.netty4.Netty4Utils;
Expand All @@ -90,7 +90,7 @@
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;

public class Netty4HttpChannelTests extends Netty4TestCase {
public class Netty4HttpChannelTests extends ESTestCase {

private NetworkService networkService;
private ThreadPool threadPool;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package org.elasticsearch.http.netty4;

import io.netty.handler.codec.http.FullHttpResponse;
import org.elasticsearch.test.Netty4IntegTestCase;
import org.elasticsearch.ESNetty4IntegTestCase;
import org.elasticsearch.common.collect.Tuple;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
Expand All @@ -46,7 +46,7 @@
* a single node "cluster". We also force test infrastructure to use the node client instead of the transport client for the same reason.
*/
@ClusterScope(scope = Scope.TEST, supportsDedicatedMasters = false, numClientNodes = 0, numDataNodes = 1, transportClientRatio = 0)
public class Netty4HttpRequestSizeLimitIT extends Netty4IntegTestCase {
public class Netty4HttpRequestSizeLimitIT extends ESNetty4IntegTestCase {

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import io.netty.handler.codec.http.HttpHeaderNames;
import io.netty.handler.codec.http.HttpResponseStatus;
import io.netty.handler.codec.http.HttpVersion;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.network.NetworkService;
import org.elasticsearch.common.settings.Setting;
import org.elasticsearch.common.settings.Settings;
Expand All @@ -44,7 +45,7 @@
import org.elasticsearch.http.NullDispatcher;
import org.elasticsearch.http.netty4.pipelining.HttpPipelinedRequest;
import org.elasticsearch.indices.breaker.NoneCircuitBreakerService;
import org.elasticsearch.test.Netty4TestCase;
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.threadpool.TestThreadPool;
import org.elasticsearch.threadpool.ThreadPool;
import org.junit.After;
Expand All @@ -68,7 +69,7 @@
/**
* This test just tests, if he pipelining works in general with out any connection the Elasticsearch handler
*/
public class Netty4HttpServerPipeliningTests extends Netty4TestCase {
public class Netty4HttpServerPipeliningTests extends ESTestCase {
private NetworkService networkService;
private ThreadPool threadPool;
private MockBigArrays bigArrays;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import io.netty.handler.codec.http.HttpResponseStatus;
import io.netty.handler.codec.http.HttpUtil;
import io.netty.handler.codec.http.HttpVersion;
import org.elasticsearch.test.Netty4TestCase;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.bytes.BytesArray;
Expand All @@ -60,6 +59,7 @@
import org.elasticsearch.rest.BytesRestResponse;
import org.elasticsearch.rest.RestChannel;
import org.elasticsearch.rest.RestRequest;
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.threadpool.TestThreadPool;
import org.elasticsearch.threadpool.ThreadPool;
import org.junit.After;
Expand Down Expand Up @@ -94,7 +94,7 @@
/**
* Tests for the {@link Netty4HttpServerTransport} class.
*/
public class Netty4HttpServerTransportTests extends Netty4TestCase {
public class Netty4HttpServerTransportTests extends ESTestCase {

private NetworkService networkService;
private ThreadPool threadPool;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
package org.elasticsearch.http.netty4;

import io.netty.handler.codec.http.FullHttpResponse;
import org.elasticsearch.ESNetty4IntegTestCase;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.TransportAddress;
import org.elasticsearch.http.HttpServerTransport;
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.elasticsearch.test.Netty4IntegTestCase;

import java.util.ArrayList;
import java.util.Collection;
Expand All @@ -36,7 +36,7 @@
import static org.hamcrest.Matchers.hasSize;

@ClusterScope(scope = Scope.TEST, supportsDedicatedMasters = false, numDataNodes = 1)
public class Netty4PipeliningDisabledIT extends Netty4IntegTestCase {
public class Netty4PipeliningDisabledIT extends ESNetty4IntegTestCase {

@Override
protected Settings nodeSettings(int nodeOrdinal) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
package org.elasticsearch.http.netty4;

import io.netty.handler.codec.http.FullHttpResponse;
import org.elasticsearch.ESNetty4IntegTestCase;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.TransportAddress;
import org.elasticsearch.http.HttpServerTransport;
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.elasticsearch.test.Netty4IntegTestCase;

import java.util.Collection;
import java.util.Locale;
Expand All @@ -35,7 +35,7 @@
import static org.hamcrest.Matchers.is;

@ClusterScope(scope = Scope.TEST, supportsDedicatedMasters = false, numDataNodes = 1)
public class Netty4PipeliningEnabledIT extends Netty4IntegTestCase {
public class Netty4PipeliningEnabledIT extends ESNetty4IntegTestCase {

@Override
protected Settings nodeSettings(int nodeOrdinal) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import io.netty.handler.codec.http.LastHttpContent;
import io.netty.handler.codec.http.QueryStringDecoder;
import org.elasticsearch.common.Randomness;
import org.elasticsearch.test.Netty4TestCase;
import org.elasticsearch.test.ESTestCase;
import org.junit.After;

import java.nio.channels.ClosedChannelException;
Expand All @@ -60,7 +60,7 @@
import static io.netty.handler.codec.http.HttpVersion.HTTP_1_1;
import static org.hamcrest.core.Is.is;

public class Netty4HttpPipeliningHandlerTests extends Netty4TestCase {
public class Netty4HttpPipeliningHandlerTests extends ESTestCase {

private final ExecutorService executorService = Executors.newFixedThreadPool(randomIntBetween(4, 8));
private final Map<String, CountDownLatch> waitingRequests = new ConcurrentHashMap<>();
Expand Down

This file was deleted.

Loading

0 comments on commit 98254dc

Please sign in to comment.